OLD | NEW |
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 Loading... |
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.DOMModel.hideDOMNodeHighlight(); | 158 SDK.OverlayModel.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 var domModel = this._frame.resourceTreeModel().domModel(); | 165 this._frame.resourceTreeModel().domModel().overlayModel().highlightFrame(t
his._frameId); |
166 domModel.highlightFrame(this._frameId); | |
167 } else { | 166 } else { |
168 this.listItemElement.classList.remove('hovered'); | 167 this.listItemElement.classList.remove('hovered'); |
169 SDK.DOMModel.hideDOMNodeHighlight(); | 168 SDK.OverlayModel.hideDOMNodeHighlight(); |
170 } | 169 } |
171 } | 170 } |
172 | 171 |
173 /** | 172 /** |
174 * @param {!SDK.Resource} resource | 173 * @param {!SDK.Resource} resource |
175 */ | 174 */ |
176 appendResource(resource) { | 175 appendResource(resource) { |
177 var resourceType = resource.resourceType(); | 176 var resourceType = resource.resourceType(); |
178 var categoryName = resourceType.name(); | 177 var categoryName = resourceType.name(); |
179 var categoryElement = resourceType === Common.resourceTypes.Document ? this
: this._categoryElements[categoryName]; | 178 var categoryElement = resourceType === Common.resourceTypes.Document ? this
: this._categoryElements[categoryName]; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 _sourceView() { | 342 _sourceView() { |
344 if (!this._sourceFrame) { | 343 if (!this._sourceFrame) { |
345 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); | 344 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); |
346 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); | 345 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); |
347 } | 346 } |
348 return this._sourceFrame; | 347 return this._sourceFrame; |
349 } | 348 } |
350 }; | 349 }; |
351 | 350 |
352 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); | 351 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); |
OLD | NEW |