| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 */ | 111 */ |
| 112 _populateFrame(frame) { | 112 _populateFrame(frame) { |
| 113 this._frameAdded(frame); | 113 this._frameAdded(frame); |
| 114 for (var child of frame.childFrames) | 114 for (var child of frame.childFrames) |
| 115 this._populateFrame(child); | 115 this._populateFrame(child); |
| 116 for (var resource of frame.resources()) | 116 for (var resource of frame.resources()) |
| 117 this._resourceAdded(resource); | 117 this._resourceAdded(resource); |
| 118 } | 118 } |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 Resources.FrameTreeElement = class extends Resources.BaseStorageTreeElement { | 121 Resources.FrameTreeElement = class extends Resources.SidebarTreeElement { |
| 122 /** | 122 /** |
| 123 * @param {!Resources.ResourcesPanel} storagePanel | 123 * @param {!Resources.ResourcesPanel} storagePanel |
| 124 * @param {!SDK.ResourceTreeFrame} frame | 124 * @param {!SDK.ResourceTreeFrame} frame |
| 125 */ | 125 */ |
| 126 constructor(storagePanel, frame) { | 126 constructor(storagePanel, frame) { |
| 127 super(storagePanel, '', false); | 127 super(storagePanel, '', false); |
| 128 this._panel = storagePanel; | 128 this._panel = storagePanel; |
| 129 this._frame = frame; | 129 this._frame = frame; |
| 130 this._frameId = frame.id; | 130 this._frameId = frame.id; |
| 131 this._categoryElements = {}; | 131 this._categoryElements = {}; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 var childCount = parentTreeElement.childCount(); | 235 var childCount = parentTreeElement.childCount(); |
| 236 var i; | 236 var i; |
| 237 for (i = 0; i < childCount; ++i) { | 237 for (i = 0; i < childCount; ++i) { |
| 238 if (compare(childTreeElement, parentTreeElement.childAt(i)) < 0) | 238 if (compare(childTreeElement, parentTreeElement.childAt(i)) < 0) |
| 239 break; | 239 break; |
| 240 } | 240 } |
| 241 parentTreeElement.insertChild(childTreeElement, i); | 241 parentTreeElement.insertChild(childTreeElement, i); |
| 242 } | 242 } |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 Resources.FrameResourceTreeElement = class extends Resources.BaseStorageTreeElem
ent { | 245 Resources.FrameResourceTreeElement = class extends Resources.SidebarTreeElement
{ |
| 246 /** | 246 /** |
| 247 * @param {!Resources.ResourcesPanel} storagePanel | 247 * @param {!Resources.ResourcesPanel} storagePanel |
| 248 * @param {!SDK.Resource} resource | 248 * @param {!SDK.Resource} resource |
| 249 */ | 249 */ |
| 250 constructor(storagePanel, resource) { | 250 constructor(storagePanel, resource) { |
| 251 super(storagePanel, resource.displayName, false); | 251 super(storagePanel, resource.displayName, false); |
| 252 this._panel = storagePanel; | 252 this._panel = storagePanel; |
| 253 /** @type {!SDK.Resource} */ | 253 /** @type {!SDK.Resource} */ |
| 254 this._resource = resource; | 254 this._resource = resource; |
| 255 /** @type {?SourceFrame.ResourceSourceFrame} */ | 255 /** @type {?SourceFrame.ResourceSourceFrame} */ |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 _sourceView() { | 347 _sourceView() { |
| 348 if (!this._sourceFrame) { | 348 if (!this._sourceFrame) { |
| 349 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); | 349 this._sourceFrame = new SourceFrame.ResourceSourceFrame(this._resource); |
| 350 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); | 350 this._sourceFrame.setHighlighterType(this._resource.canonicalMimeType()); |
| 351 } | 351 } |
| 352 return this._sourceFrame; | 352 return this._sourceFrame; |
| 353 } | 353 } |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); | 356 Resources.FrameResourceTreeElement._symbol = Symbol('treeElement'); |
| OLD | NEW |