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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesSection.js

Issue 2826833002: Revert of [DevTools] Consolidate overlay-related functionality in Overlay domain (Closed)
Patch Set: Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 Resources.ResourcesSection = class { 5 Resources.ResourcesSection = class {
6 /** 6 /**
7 * @param {!Resources.ResourcesPanel} storagePanel 7 * @param {!Resources.ResourcesPanel} storagePanel
8 * @param {!UI.TreeElement} treeElement 8 * @param {!UI.TreeElement} treeElement
9 */ 9 */
10 constructor(storagePanel, treeElement) { 10 constructor(storagePanel, treeElement) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 /** 149 /**
150 * @override 150 * @override
151 * @return {boolean} 151 * @return {boolean}
152 */ 152 */
153 onselect(selectedByUser) { 153 onselect(selectedByUser) {
154 super.onselect(selectedByUser); 154 super.onselect(selectedByUser);
155 this._panel.showCategoryView(this.titleAsText()); 155 this._panel.showCategoryView(this.titleAsText());
156 156
157 this.listItemElement.classList.remove('hovered'); 157 this.listItemElement.classList.remove('hovered');
158 SDK.OverlayModel.hideDOMNodeHighlight(); 158 SDK.DOMModel.hideDOMNodeHighlight();
159 return false; 159 return false;
160 } 160 }
161 161
162 set hovered(hovered) { 162 set hovered(hovered) {
163 if (hovered) { 163 if (hovered) {
164 this.listItemElement.classList.add('hovered'); 164 this.listItemElement.classList.add('hovered');
165 this._frame.resourceTreeModel().domModel().overlayModel().highlightFrame(t his._frameId); 165 var domModel = this._frame.resourceTreeModel().domModel();
166 domModel.highlightFrame(this._frameId);
166 } else { 167 } else {
167 this.listItemElement.classList.remove('hovered'); 168 this.listItemElement.classList.remove('hovered');
168 SDK.OverlayModel.hideDOMNodeHighlight(); 169 SDK.DOMModel.hideDOMNodeHighlight();
169 } 170 }
170 } 171 }
171 172
172 /** 173 /**
173 * @param {!SDK.Resource} resource 174 * @param {!SDK.Resource} resource
174 */ 175 */
175 appendResource(resource) { 176 appendResource(resource) {
176 var resourceType = resource.resourceType(); 177 var resourceType = resource.resourceType();
177 var categoryName = resourceType.name(); 178 var categoryName = resourceType.name();
178 var categoryElement = resourceType === Common.resourceTypes.Document ? this : this._categoryElements[categoryName]; 179 var categoryElement = resourceType === Common.resourceTypes.Document ? this : this._categoryElements[categoryName];
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 _sourceView() { 343 _sourceView() {
343 if (!this._sourceFrame) { 344 if (!this._sourceFrame) {
344 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); 345 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource);
345 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); 346 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType());
346 } 347 }
347 return this._sourceFrame; 348 return this._sourceFrame;
348 } 349 }
349 }; 350 };
350 351
351 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); 352 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698