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.ResourcesPanel = class extends UI.PanelWithSidebar { | 5 Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
6 constructor() { | 6 constructor() { |
7 super('resources'); | 7 super('resources'); |
8 this.registerRequiredCSS('resources/resourcesPanel.css'); | 8 this.registerRequiredCSS('resources/resourcesPanel.css'); |
9 | 9 |
10 this._resourcesLastSelectedItemSetting = Common.settings.createSetting('reso
urcesLastSelectedItem', ''); | 10 this._resourcesLastSelectedItemSetting = Common.settings.createSetting('reso
urcesLastSelectedItem', ''); |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 /** @type {?Resources.DOMStorageItemsView} */ | 23 /** @type {?Resources.DOMStorageItemsView} */ |
24 this._domStorageView = null; | 24 this._domStorageView = null; |
25 | 25 |
26 /** @type {?Resources.CookieItemsView} */ | 26 /** @type {?Resources.CookieItemsView} */ |
27 this._cookieView = null; | 27 this._cookieView = null; |
28 | 28 |
29 /** @type {?UI.EmptyWidget} */ | 29 /** @type {?UI.EmptyWidget} */ |
30 this._emptyWidget = null; | 30 this._emptyWidget = null; |
31 | 31 |
32 this._sidebar = new Resources.ApplicationPanelSidebar(this); | 32 if (Runtime.experiments.isEnabled('framesSelectorAppPanel')) |
| 33 this._sidebar = new Resources.ApplicationPanelSidebarWithFramesSelector(); |
| 34 else |
| 35 this._sidebar = new Resources.ApplicationPanelSidebar(this); |
33 this._sidebar.show(this.panelSidebarElement()); | 36 this._sidebar.show(this.panelSidebarElement()); |
34 } | 37 } |
35 | 38 |
36 /** | 39 /** |
37 * @return {!Resources.ResourcesPanel} | 40 * @return {!Resources.ResourcesPanel} |
38 */ | 41 */ |
39 static _instance() { | 42 static _instance() { |
40 return /** @type {!Resources.ResourcesPanel} */ (self.runtime.sharedInstance
(Resources.ResourcesPanel)); | 43 return /** @type {!Resources.ResourcesPanel} */ (self.runtime.sharedInstance
(Resources.ResourcesPanel)); |
41 } | 44 } |
42 | 45 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 * @param {!Object} resource | 168 * @param {!Object} resource |
166 * @return {!Promise} | 169 * @return {!Promise} |
167 */ | 170 */ |
168 reveal(resource) { | 171 reveal(resource) { |
169 if (!(resource instanceof SDK.Resource)) | 172 if (!(resource instanceof SDK.Resource)) |
170 return Promise.reject(new Error('Internal error: not a resource')); | 173 return Promise.reject(new Error('Internal error: not a resource')); |
171 var panel = Resources.ResourcesPanel._instance()._sidebar; | 174 var panel = Resources.ResourcesPanel._instance()._sidebar; |
172 return UI.viewManager.showView('resources').then(panel.showResource.bind(pan
el, resource)); | 175 return UI.viewManager.showView('resources').then(panel.showResource.bind(pan
el, resource)); |
173 } | 176 } |
174 }; | 177 }; |
OLD | NEW |