Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js |
| similarity index 86% |
| copy from third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js |
| copy to third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js |
| index 2229844043a037c2238ccf6864a77ac10a27a075..162c1a8e6afa1e445006b86cefe05560560ef893 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js |
| @@ -31,18 +31,19 @@ |
| * @implements {SDK.TargetManager.Observer} |
| * @unrestricted |
| */ |
| -Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| - constructor() { |
| - super('resources'); |
| - this.registerRequiredCSS('resources/resourcesPanel.css'); |
| +Resources.ApplicationPanelSidebar = class extends Common.Object { |
| + /** |
| + * @param {!Resources.ResourcesPanel} panel |
| + */ |
| + constructor(panel) { |
| + super(); |
| - this._resourcesLastSelectedItemSetting = Common.settings.createSetting('resourcesLastSelectedItem', {}); |
| + this._panel = panel; |
| this._sidebarTree = new UI.TreeOutlineInShadow(); |
| this._sidebarTree.element.classList.add('resources-sidebar'); |
| this._sidebarTree.registerRequiredCSS('resources/resourcesSidebar.css'); |
| this._sidebarTree.element.classList.add('filter-all'); |
| - this.panelSidebarElement().appendChild(this._sidebarTree.element); |
| this._applicationTreeElement = this._addSidebarSection(Common.UIString('Application')); |
| this._manifestTreeElement = new Resources.AppManifestTreeElement(this); |
| @@ -54,46 +55,41 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| var storageTreeElement = this._addSidebarSection(Common.UIString('Storage')); |
| this.localStorageListTreeElement = |
| - new Resources.StorageCategoryTreeElement(this, Common.UIString('Local Storage'), 'LocalStorage'); |
| + new Resources.StorageCategoryTreeElement(panel, Common.UIString('Local Storage'), 'LocalStorage'); |
| var localStorageIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item'); |
| this.localStorageListTreeElement.setLeadingIcons([localStorageIcon]); |
| storageTreeElement.appendChild(this.localStorageListTreeElement); |
| this.sessionStorageListTreeElement = |
| - new Resources.StorageCategoryTreeElement(this, Common.UIString('Session Storage'), 'SessionStorage'); |
| + new Resources.StorageCategoryTreeElement(panel, Common.UIString('Session Storage'), 'SessionStorage'); |
| var sessionStorageIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item'); |
| this.sessionStorageListTreeElement.setLeadingIcons([sessionStorageIcon]); |
| storageTreeElement.appendChild(this.sessionStorageListTreeElement); |
| - this.indexedDBListTreeElement = new Resources.IndexedDBTreeElement(this); |
| + this.indexedDBListTreeElement = new Resources.IndexedDBTreeElement(panel); |
| storageTreeElement.appendChild(this.indexedDBListTreeElement); |
| this.databasesListTreeElement = |
| - new Resources.StorageCategoryTreeElement(this, Common.UIString('Web SQL'), 'Databases'); |
| + new Resources.StorageCategoryTreeElement(panel, Common.UIString('Web SQL'), 'Databases'); |
| var databaseIcon = UI.Icon.create('mediumicon-database', 'resource-tree-item'); |
| this.databasesListTreeElement.setLeadingIcons([databaseIcon]); |
| storageTreeElement.appendChild(this.databasesListTreeElement); |
| - this.cookieListTreeElement = new Resources.StorageCategoryTreeElement(this, Common.UIString('Cookies'), 'Cookies'); |
| + this.cookieListTreeElement = new Resources.StorageCategoryTreeElement(panel, Common.UIString('Cookies'), 'Cookies'); |
| var cookieIcon = UI.Icon.create('mediumicon-cookie', 'resource-tree-item'); |
| this.cookieListTreeElement.setLeadingIcons([cookieIcon]); |
| storageTreeElement.appendChild(this.cookieListTreeElement); |
| var cacheTreeElement = this._addSidebarSection(Common.UIString('Cache')); |
| - this.cacheStorageListTreeElement = new Resources.ServiceWorkerCacheTreeElement(this); |
| + this.cacheStorageListTreeElement = new Resources.ServiceWorkerCacheTreeElement(panel); |
| cacheTreeElement.appendChild(this.cacheStorageListTreeElement); |
| this.applicationCacheListTreeElement = |
| - new Resources.StorageCategoryTreeElement(this, Common.UIString('Application Cache'), 'ApplicationCache'); |
| + new Resources.StorageCategoryTreeElement(panel, Common.UIString('Application Cache'), 'ApplicationCache'); |
| var applicationCacheIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item'); |
| this.applicationCacheListTreeElement.setLeadingIcons([applicationCacheIcon]); |
| cacheTreeElement.appendChild(this.applicationCacheListTreeElement); |
| - this._resourcesSection = new Resources.ResourcesSection(this, this._addSidebarSection(Common.UIString('Frames'))); |
| - |
| - var mainContainer = new UI.VBox(); |
| - this.storageViews = mainContainer.element.createChild('div', 'vbox flex-auto'); |
| - this._storageViewToolbar = new UI.Toolbar('resources-toolbar', mainContainer.element); |
| - this.splitWidget().setMainWidget(mainContainer); |
| + this._resourcesSection = new Resources.ResourcesSection(panel, this._addSidebarSection(Common.UIString('Frames'))); |
| /** @type {!Map.<!Resources.Database, !Object.<string, !Resources.DatabaseTableView>>} */ |
| this._databaseTableViews = new Map(); |
| @@ -111,8 +107,8 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| /** @type {?Resources.CookieItemsView} */ |
| this._cookieView = null; |
| - this.panelSidebarElement().addEventListener('mousemove', this._onmousemove.bind(this), false); |
| - this.panelSidebarElement().addEventListener('mouseleave', this._onmouseleave.bind(this), false); |
| + this._sidebarTree.contentElement.addEventListener('mousemove', this._onmousemove.bind(this), false); |
| + this._sidebarTree.contentElement.addEventListener('mouseleave', this._onmouseleave.bind(this), false); |
| SDK.targetManager.observeTargets(this); |
| SDK.targetManager.addModelListener( |
| @@ -120,10 +116,10 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| } |
| /** |
| - * @return {!Resources.ResourcesPanel} |
| + * @return {!UI.TreeOutline} |
| */ |
| - static _instance() { |
| - return /** @type {!Resources.ResourcesPanel} */ (self.runtime.sharedInstance(Resources.ResourcesPanel)); |
| + sidebarTree() { |
| + return this._sidebarTree; |
| } |
| /** |
| @@ -185,13 +181,6 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| this._resetWithFrames(); |
| } |
| - /** |
| - * @override |
| - */ |
| - focus() { |
| - this._sidebarTree.focus(); |
| - } |
| - |
| _initialize() { |
| for (var frame of SDK.ResourceTreeModel.frames()) |
| this._addCookieDocument(frame); |
| @@ -211,12 +200,12 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| if (domStorageModel) |
| this._populateDOMStorageTree(domStorageModel); |
| this.indexedDBListTreeElement._initialize(); |
| - this.cacheStorageListTreeElement._initialize(); |
| + this.cacheStorageListTreeElement._initialize(this._target); |
| this._initDefaultSelection(); |
| } |
| _initDefaultSelection() { |
| - var itemURL = this._resourcesLastSelectedItemSetting.get(); |
| + var itemURL = this._panel.lastSelectedItemURL(); |
| if (itemURL) { |
| var rootElement = this._sidebarTree.rootElement(); |
| for (var treeElement = rootElement.firstChild(); treeElement; |
| @@ -236,12 +225,6 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| } |
| _resetWebSQL() { |
| - if (this.visibleView instanceof Resources.DatabaseQueryView || |
| - this.visibleView instanceof Resources.DatabaseTableView) { |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| - } |
| - |
| var queryViews = this._databaseQueryViews.valuesArray(); |
| for (var i = 0; i < queryViews.length; ++i) { |
| queryViews[i].removeEventListener( |
| @@ -255,29 +238,16 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| } |
| _resetDOMStorage() { |
| - if (this.visibleView === this._domStorageView) { |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| - } |
| - |
| this._domStorageTreeElements.clear(); |
| this.localStorageListTreeElement.removeChildren(); |
| this.sessionStorageListTreeElement.removeChildren(); |
| } |
| _resetCookies() { |
| - if (this.visibleView instanceof Resources.CookieItemsView) { |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| - } |
| this.cookieListTreeElement.removeChildren(); |
| } |
| _resetCacheStorage() { |
| - if (this.visibleView instanceof Resources.ServiceWorkerCacheView) { |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| - } |
| this.cacheStorageListTreeElement.removeChildren(); |
| this.cacheStorageListTreeElement.setExpandable(false); |
| } |
| @@ -296,13 +266,7 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| this._resetCacheStorage(); |
| // No need to this._resetAppCache. |
| - if ((this.visibleView instanceof SourceFrame.ResourceSourceFrame) || |
| - (this.visibleView instanceof SourceFrame.ImageView) || (this.visibleView instanceof SourceFrame.FontView)) { |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| - } |
| - |
| - this._storageViewToolbar.removeToolbarItems(); |
| + this._panel.resetView(); |
| if (this._sidebarTree.selectedTreeElement) |
| this._sidebarTree.selectedTreeElement.deselect(); |
| @@ -405,7 +369,7 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| */ |
| selectDOMStorage(domStorage) { |
| if (domStorage) { |
| - this._showDOMStorage(domStorage); |
| + this.showDOMStorage(domStorage); |
| this._domStorageTreeElements.get(domStorage).select(); |
| } |
| } |
| @@ -475,7 +439,7 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| /** |
| * @param {!Resources.DOMStorage} domStorage |
| */ |
| - _showDOMStorage(domStorage) { |
| + showDOMStorage(domStorage) { |
| if (!domStorage) |
| return; |
| @@ -527,35 +491,8 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| this._innerShowView(view); |
| } |
| - showCategoryView(categoryName) { |
| - if (!this._categoryView) |
| - this._categoryView = new Resources.StorageCategoryView(); |
| - this._categoryView.setText(categoryName); |
| - this._innerShowView(this._categoryView); |
| - } |
| - |
| _innerShowView(view) { |
| - if (this.visibleView === view) |
| - return; |
| - |
| - if (this.visibleView) |
| - this.visibleView.detach(); |
| - |
| - view.show(this.storageViews); |
| - this.visibleView = view; |
| - |
| - this._storageViewToolbar.removeToolbarItems(); |
| - var toolbarItems = (view instanceof UI.SimpleView && view.syncToolbarItems()) || []; |
| - for (var i = 0; i < toolbarItems.length; ++i) |
| - this._storageViewToolbar.appendToolbarItem(toolbarItems[i]); |
| - this._storageViewToolbar.element.classList.toggle('hidden', !toolbarItems.length); |
| - } |
| - |
| - closeVisibleView() { |
| - if (!this.visibleView) |
| - return; |
| - this.visibleView.detach(); |
| - delete this.visibleView; |
| + this._panel.showView(view); |
| } |
| _updateDatabaseTables(event) { |
| @@ -575,7 +512,7 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| return; |
| var tableNamesHash = {}; |
| - var self = this; |
| + var panel = this._panel; |
| function tableNamesCallback(tableNames) { |
| var tableNamesLength = tableNames.length; |
| for (var i = 0; i < tableNamesLength; ++i) |
| @@ -583,8 +520,8 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| for (var tableName in tableViews) { |
| if (!(tableName in tableNamesHash)) { |
| - if (self.visibleView === tableViews[tableName]) |
| - self.closeVisibleView(); |
| + if (panel.visibleView === tableViews[tableName]) |
| + panel.showView(null); |
| delete tableViews[tableName]; |
| } |
| } |
| @@ -715,122 +652,18 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar { |
| }; |
| /** |
| - * @implements {Common.Revealer} |
| * @unrestricted |
| */ |
| -Resources.ResourcesPanel.ResourceRevealer = class { |
| +Resources.BaseStorageTreeElement = class extends Resources.SidebarTreeElement { |
| /** |
| - * @override |
| - * @param {!Object} resource |
| - * @return {!Promise} |
| - */ |
| - reveal(resource) { |
| - if (!(resource instanceof SDK.Resource)) |
| - return Promise.reject(new Error('Internal error: not a resource')); |
| - var panel = Resources.ResourcesPanel._instance(); |
| - return UI.viewManager.showView('resources').then(panel.showResource.bind(panel, resource)); |
| - } |
| -}; |
| - |
| -/** |
| - * @unrestricted |
| - */ |
| -Resources.BaseStorageTreeElement = class extends UI.TreeElement { |
| - /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| * @param {string} title |
| * @param {boolean} expandable |
| */ |
| constructor(storagePanel, title, expandable) { |
| - super(title, expandable); |
| + super(storagePanel._panel, title, expandable); |
| this._storagePanel = storagePanel; |
| } |
| - |
| - /** |
| - * @override |
| - * @return {boolean} |
| - */ |
| - onselect(selectedByUser) { |
| - if (!selectedByUser) |
| - return false; |
| - var itemURL = this.itemURL; |
| - if (itemURL) |
| - this._storagePanel._resourcesLastSelectedItemSetting.set(itemURL); |
| - return false; |
| - } |
| - |
| - /** |
| - * @protected |
| - * @param {?UI.Widget} view |
| - */ |
| - showView(view) { |
| - if (!view) { |
| - this._storagePanel.visibleView.detach(); |
| - return; |
| - } |
| - this._storagePanel._innerShowView(view); |
| - } |
| -}; |
| - |
| -/** |
| - * @unrestricted |
| - */ |
| -Resources.StorageCategoryTreeElement = class extends Resources.BaseStorageTreeElement { |
| - /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| - * @param {string} categoryName |
| - * @param {string} settingsKey |
| - */ |
| - constructor(storagePanel, categoryName, settingsKey) { |
| - super(storagePanel, categoryName, false); |
| - this._expandedSetting = |
| - Common.settings.createSetting('resources' + settingsKey + 'Expanded', settingsKey === 'Frames'); |
| - this._categoryName = categoryName; |
| - } |
| - |
| - /** |
| - * @return {!SDK.Target} |
| - */ |
| - target() { |
| - return this._storagePanel._target; |
| - } |
| - |
| - get itemURL() { |
| - return 'category://' + this._categoryName; |
| - } |
| - |
| - /** |
| - * @override |
| - * @return {boolean} |
| - */ |
| - onselect(selectedByUser) { |
| - super.onselect(selectedByUser); |
| - this._storagePanel.showCategoryView(this._categoryName); |
| - return false; |
| - } |
| - |
| - /** |
| - * @override |
| - */ |
| - onattach() { |
| - super.onattach(); |
| - if (this._expandedSetting.get()) |
| - this.expand(); |
| - } |
| - |
| - /** |
| - * @override |
| - */ |
| - onexpand() { |
| - this._expandedSetting.set(true); |
| - } |
| - |
| - /** |
| - * @override |
| - */ |
| - oncollapse() { |
| - this._expandedSetting.set(false); |
| - } |
| }; |
| /** |
| @@ -838,7 +671,7 @@ Resources.StorageCategoryTreeElement = class extends Resources.BaseStorageTreeEl |
| */ |
| Resources.DatabaseTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| * @param {!Resources.Database} database |
| */ |
| constructor(storagePanel, database) { |
| @@ -924,12 +757,17 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor |
| super(storagePanel, Common.UIString('Cache Storage'), 'CacheStorage'); |
| var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item'); |
| this.setLeadingIcons([icon]); |
| + /** @type {?SDK.Target} */ |
| + this._target = null; |
|
caseq
2017/03/20 18:04:26
Can we rather explicitly keep the model that we ne
eostroukhov
2017/03/20 19:28:01
Done.
|
| } |
| - _initialize() { |
| + /** |
| + * @param {?SDK.Target} target |
| + */ |
| + _initialize(target) { |
| + this._target = target; |
| /** @type {!Array.<!Resources.SWCacheTreeElement>} */ |
| this._swCacheTreeElements = []; |
| - var target = this._storagePanel._target; |
| var model = target && SDK.ServiceWorkerCacheModel.fromTarget(target); |
| if (model) { |
| for (var cache of model.caches()) |
| @@ -956,9 +794,8 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor |
| } |
| _refreshCaches() { |
| - var target = this._storagePanel._target; |
| - if (target) { |
| - var model = SDK.ServiceWorkerCacheModel.fromTarget(target); |
| + if (this._target) { |
| + var model = SDK.ServiceWorkerCacheModel.fromTarget(this._target); |
| if (!model) |
| return; |
| model.refreshCacheNames(); |
| @@ -979,7 +816,7 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor |
| * @param {!SDK.ServiceWorkerCacheModel.Cache} cache |
| */ |
| _addCache(model, cache) { |
| - var swCacheTreeElement = new Resources.SWCacheTreeElement(this._storagePanel, model, cache); |
| + var swCacheTreeElement = new Resources.SWCacheTreeElement(this.resourcesPanel, model, cache); |
| this._swCacheTreeElements.push(swCacheTreeElement); |
| this.appendChild(swCacheTreeElement); |
| } |
| @@ -1022,7 +859,7 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor |
| /** |
| * @unrestricted |
| */ |
| -Resources.SWCacheTreeElement = class extends Resources.BaseStorageTreeElement { |
| +Resources.SWCacheTreeElement = class extends Resources.SidebarTreeElement { |
| /** |
| * @param {!Resources.ResourcesPanel} storagePanel |
| * @param {!SDK.ServiceWorkerCacheModel} model |
| @@ -1092,7 +929,7 @@ Resources.SWCacheTreeElement = class extends Resources.BaseStorageTreeElement { |
| */ |
| Resources.ServiceWorkersTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| */ |
| constructor(storagePanel) { |
| super(storagePanel, Common.UIString('Service Workers'), false); |
| @@ -1125,7 +962,7 @@ Resources.ServiceWorkersTreeElement = class extends Resources.BaseStorageTreeEle |
| */ |
| Resources.AppManifestTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| */ |
| constructor(storagePanel) { |
| super(storagePanel, Common.UIString('Manifest'), false); |
| @@ -1158,7 +995,7 @@ Resources.AppManifestTreeElement = class extends Resources.BaseStorageTreeElemen |
| */ |
| Resources.ClearStorageTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| */ |
| constructor(storagePanel) { |
| super(storagePanel, Common.UIString('Clear storage'), false); |
| @@ -1180,7 +1017,7 @@ Resources.ClearStorageTreeElement = class extends Resources.BaseStorageTreeEleme |
| onselect(selectedByUser) { |
| super.onselect(selectedByUser); |
| if (!this._view) |
| - this._view = new Resources.ClearStorageView(this._storagePanel); |
| + this._view = new Resources.ClearStorageView(); |
| this.showView(this._view); |
| return false; |
| } |
| @@ -1252,7 +1089,7 @@ Resources.IndexedDBTreeElement = class extends Resources.StorageCategoryTreeElem |
| * @param {!Resources.IndexedDBModel.DatabaseId} databaseId |
| */ |
| _addIndexedDB(model, databaseId) { |
| - var idbDatabaseTreeElement = new Resources.IDBDatabaseTreeElement(this._storagePanel, model, databaseId); |
| + var idbDatabaseTreeElement = new Resources.IDBDatabaseTreeElement(this.resourcesPanel, model, databaseId); |
| this._idbDatabaseTreeElements.push(idbDatabaseTreeElement); |
| this.appendChild(idbDatabaseTreeElement); |
| model.refreshDatabase(databaseId); |
| @@ -1311,7 +1148,7 @@ Resources.IndexedDBTreeElement = class extends Resources.StorageCategoryTreeElem |
| /** |
| * @unrestricted |
| */ |
| -Resources.IDBDatabaseTreeElement = class extends Resources.BaseStorageTreeElement { |
| +Resources.IDBDatabaseTreeElement = class extends Resources.SidebarTreeElement { |
| /** |
| * @param {!Resources.ResourcesPanel} storagePanel |
| * @param {!Resources.IndexedDBModel} model |
| @@ -1359,7 +1196,7 @@ Resources.IDBDatabaseTreeElement = class extends Resources.BaseStorageTreeElemen |
| objectStoreNames[objectStore.name] = true; |
| if (!this._idbObjectStoreTreeElements[objectStore.name]) { |
| var idbObjectStoreTreeElement = |
| - new Resources.IDBObjectStoreTreeElement(this._storagePanel, this._model, this._databaseId, objectStore); |
| + new Resources.IDBObjectStoreTreeElement(this.resourcesPanel, this._model, this._databaseId, objectStore); |
| this._idbObjectStoreTreeElements[objectStore.name] = idbObjectStoreTreeElement; |
| this.appendChild(idbObjectStoreTreeElement); |
| } |
| @@ -1412,7 +1249,7 @@ Resources.IDBDatabaseTreeElement = class extends Resources.BaseStorageTreeElemen |
| /** |
| * @unrestricted |
| */ |
| -Resources.IDBObjectStoreTreeElement = class extends Resources.BaseStorageTreeElement { |
| +Resources.IDBObjectStoreTreeElement = class extends Resources.SidebarTreeElement { |
| /** |
| * @param {!Resources.ResourcesPanel} storagePanel |
| * @param {!Resources.IndexedDBModel} model |
| @@ -1469,7 +1306,7 @@ Resources.IDBObjectStoreTreeElement = class extends Resources.BaseStorageTreeEle |
| indexNames[index.name] = true; |
| if (!this._idbIndexTreeElements[index.name]) { |
| var idbIndexTreeElement = new Resources.IDBIndexTreeElement( |
| - this._storagePanel, this._model, this._databaseId, this._objectStore, index); |
| + this.resourcesPanel, this._model, this._databaseId, this._objectStore, index); |
| this._idbIndexTreeElements[index.name] = idbIndexTreeElement; |
| this.appendChild(idbIndexTreeElement); |
| } |
| @@ -1537,7 +1374,7 @@ Resources.IDBObjectStoreTreeElement = class extends Resources.BaseStorageTreeEle |
| /** |
| * @unrestricted |
| */ |
| -Resources.IDBIndexTreeElement = class extends Resources.BaseStorageTreeElement { |
| +Resources.IDBIndexTreeElement = class extends Resources.SidebarTreeElement { |
| /** |
| * @param {!Resources.ResourcesPanel} storagePanel |
| * @param {!Resources.IndexedDBModel} model |
| @@ -1622,7 +1459,7 @@ Resources.DOMStorageTreeElement = class extends Resources.BaseStorageTreeElement |
| */ |
| onselect(selectedByUser) { |
| super.onselect(selectedByUser); |
| - this._storagePanel._showDOMStorage(this._domStorage); |
| + this._storagePanel.showDOMStorage(this._domStorage); |
| return false; |
| } |
| @@ -1643,7 +1480,7 @@ Resources.DOMStorageTreeElement = class extends Resources.BaseStorageTreeElement |
| Resources.CookieTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| * @param {!SDK.ResourceTreeFrame} frame |
| * @param {string} cookieDomain |
| */ |
| @@ -1713,7 +1550,7 @@ Resources.ApplicationCacheManifestTreeElement = class extends Resources.BaseStor |
| */ |
| onselect(selectedByUser) { |
| super.onselect(selectedByUser); |
| - this._storagePanel.showCategoryView(this._manifestURL); |
| + this.resourcesPanel.showCategoryView(this._manifestURL); |
| return false; |
| } |
| }; |
| @@ -1723,7 +1560,7 @@ Resources.ApplicationCacheManifestTreeElement = class extends Resources.BaseStor |
| */ |
| Resources.ApplicationCacheFrameTreeElement = class extends Resources.BaseStorageTreeElement { |
| /** |
| - * @param {!Resources.ResourcesPanel} storagePanel |
| + * @param {!Resources.ApplicationPanelSidebar} storagePanel |
| * @param {!Protocol.Page.FrameId} frameId |
| * @param {string} manifestURL |
| */ |