Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: Source/devtools/front_end/sdk/CSSStyleModel.js

Issue 369853002: DevTools: Rename TargetAwareObject into SDKObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.TargetAwareObject} 33 * @extends {WebInspector.SDKObject}
34 * @param {!WebInspector.Target} target 34 * @param {!WebInspector.Target} target
35 */ 35 */
36 WebInspector.CSSStyleModel = function(target) 36 WebInspector.CSSStyleModel = function(target)
37 { 37 {
38 WebInspector.TargetAwareObject.call(this, target); 38 WebInspector.SDKObject.call(this, target);
39 this._domModel = target.domModel; 39 this._domModel = target.domModel;
40 this._agent = target.cssAgent(); 40 this._agent = target.cssAgent();
41 this._pendingCommandsMajorState = []; 41 this._pendingCommandsMajorState = [];
42 this._styleLoader = new WebInspector.CSSStyleModel.ComputedStyleLoader(this) ; 42 this._styleLoader = new WebInspector.CSSStyleModel.ComputedStyleLoader(this) ;
43 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoRequest ed, this._undoRedoRequested, this); 43 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoRequest ed, this._undoRedoRequested, this);
44 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoComplet ed, this._undoRedoCompleted, this); 44 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoComplet ed, this._undoRedoCompleted, this);
45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.MainFrameNavigated, this._mainFrameNavigated, this); 45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.MainFrameNavigated, this._mainFrameNavigated, this);
46 target.registerCSSDispatcher(new WebInspector.CSSDispatcher(this)); 46 target.registerCSSDispatcher(new WebInspector.CSSDispatcher(this));
47 this._agent.enable(this._wasEnabled.bind(this)); 47 this._agent.enable(this._wasEnabled.bind(this));
48 this._resetStyleSheets(); 48 this._resetStyleSheets();
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 styleSheetIds = styleSheetIds.concat(frameIdToSheetIds[frameId]); 610 styleSheetIds = styleSheetIds.concat(frameIdToSheetIds[frameId]);
611 var uiLocation; 611 var uiLocation;
612 for (var i = 0; !uiLocation && i < styleSheetIds.length; ++i) { 612 for (var i = 0; !uiLocation && i < styleSheetIds.length; ++i) {
613 var header = this.styleSheetHeaderForId(styleSheetIds[i]); 613 var header = this.styleSheetHeaderForId(styleSheetIds[i]);
614 console.assert(header); 614 console.assert(header);
615 uiLocation = header.rawLocationToUILocation(rawLocation.lineNumber, rawLocation.columnNumber); 615 uiLocation = header.rawLocationToUILocation(rawLocation.lineNumber, rawLocation.columnNumber);
616 } 616 }
617 return uiLocation || null; 617 return uiLocation || null;
618 }, 618 },
619 619
620 __proto__: WebInspector.TargetAwareObject.prototype 620 __proto__: WebInspector.SDKObject.prototype
621 } 621 }
622 622
623 /** 623 /**
624 * @constructor 624 * @constructor
625 * @extends {WebInspector.LiveLocation} 625 * @extends {WebInspector.LiveLocation}
626 * @param {!WebInspector.CSSStyleModel} model 626 * @param {!WebInspector.CSSStyleModel} model
627 * @param {?WebInspector.CSSStyleSheetHeader} header 627 * @param {?WebInspector.CSSStyleSheetHeader} header
628 * @param {!WebInspector.CSSLocation} rawLocation 628 * @param {!WebInspector.CSSLocation} rawLocation
629 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e 629 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e
630 */ 630 */
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 for (var i = 0; i < callbacks.length; ++i) 1816 for (var i = 0; i < callbacks.length; ++i)
1817 callbacks[i](computedStyle); 1817 callbacks[i](computedStyle);
1818 } 1818 }
1819 } 1819 }
1820 } 1820 }
1821 1821
1822 /** 1822 /**
1823 * @type {!WebInspector.CSSStyleModel} 1823 * @type {!WebInspector.CSSStyleModel}
1824 */ 1824 */
1825 WebInspector.cssModel; 1825 WebInspector.cssModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/CPUProfilerModel.js ('k') | Source/devtools/front_end/sdk/ConsoleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698