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

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

Issue 2773583002: [DevTools] Introduce a sidebar with a drop-down
Patch Set: [DevTools] Introduce a sidebar with a drop-down 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.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
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('framesMenuAppPanel'))
33 this._sidebar = new Resources.FrameMenuSidebar();
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 * @param {!Object} resource 173 * @param {!Object} resource
171 * @return {!Promise} 174 * @return {!Promise}
172 */ 175 */
173 reveal(resource) { 176 reveal(resource) {
174 if (!(resource instanceof SDK.Resource)) 177 if (!(resource instanceof SDK.Resource))
175 return Promise.reject(new Error('Internal error: not a resource')); 178 return Promise.reject(new Error('Internal error: not a resource'));
176 var panel = Resources.ResourcesPanel._instance()._sidebar; 179 var panel = Resources.ResourcesPanel._instance()._sidebar;
177 return UI.viewManager.showView('resources').then(panel.showResource.bind(pan el, resource)); 180 return UI.viewManager.showView('resources').then(panel.showResource.bind(pan el, resource));
178 } 181 }
179 }; 182 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698