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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.SidebarPane} 7 * @extends {WebInspector.SidebarPane}
8 * @param {string} title 8 * @param {string} title
9 */ 9 */
10 WebInspector.ElementsSidebarPane = function(title) 10 WebInspector.ElementsSidebarPane = function(title)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 WebInspector.EventTarget.removeEventListeners(this._targetEvents); 81 WebInspector.EventTarget.removeEventListeners(this._targetEvents);
82 this._targetEvents = null; 82 this._targetEvents = null;
83 } 83 }
84 this._target = target; 84 this._target = target;
85 85
86 var domModel = null; 86 var domModel = null;
87 var resourceTreeModel = null; 87 var resourceTreeModel = null;
88 if (target) { 88 if (target) {
89 this._cssModel = WebInspector.CSSModel.fromTarget(target); 89 this._cssModel = WebInspector.CSSModel.fromTarget(target);
90 domModel = WebInspector.DOMModel.fromTarget(target); 90 domModel = WebInspector.DOMModel.fromTarget(target);
91 resourceTreeModel = target.resourceTreeModel; 91 resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target );
92 } 92 }
93 93
94 if (this._cssModel && domModel && resourceTreeModel) { 94 if (this._cssModel && domModel && resourceTreeModel) {
dgozman 2016/07/14 16:29:28 We should split "&& resourceTreeModel" out. This p
eostroukhov-old 2016/07/20 23:46:15 This code have been removed.
95 this._targetEvents = [ 95 this._targetEvents = [
96 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetAdded, this.onCSSModelChanged, this), 96 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetAdded, this.onCSSModelChanged, this),
97 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetRemoved, this.onCSSModelChanged, this), 97 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetRemoved, this.onCSSModelChanged, this),
98 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetChanged, this.onCSSModelChanged, this), 98 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty leSheetChanged, this.onCSSModelChanged, this),
99 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med iaQueryResultChanged, this.onCSSModelChanged, this), 99 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med iaQueryResultChanged, this.onCSSModelChanged, this),
100 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse udoStateForced, this.onCSSModelChanged, this), 100 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse udoStateForced, this.onCSSModelChanged, this),
101 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Mod elWasEnabled, this.onCSSModelChanged, this), 101 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Mod elWasEnabled, this.onCSSModelChanged, this),
102 domModel.addEventListener(WebInspector.DOMModel.Events.DOMMutate d, this._domModelChanged, this), 102 domModel.addEventListener(WebInspector.DOMModel.Events.DOMMutate d, this._domModelChanged, this),
103 resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode l.EventTypes.FrameResized, this._onFrameResized, this), 103 resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode l.EventTypes.FrameResized, this._onFrameResized, this),
104 ]; 104 ];
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return this._view.isShowing() ? this._doUpdate.call(null) : Promise. resolve(); 179 return this._view.isShowing() ? this._doUpdate.call(null) : Promise. resolve();
180 } 180 }
181 }, 181 },
182 182
183 viewWasShown: function() 183 viewWasShown: function()
184 { 184 {
185 if (this._updateWhenVisible) 185 if (this._updateWhenVisible)
186 this.update(); 186 this.update();
187 } 187 }
188 } 188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698