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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js

Issue 2916193003: [CacheStorage] [IndexedDB] [DevTools] Added refresh button to category view of cache storage and in… (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js
index 6b2d25e6b90ae567d4a9d0fc06bc222cf231818b..e40198854cf9e8351ff85852ec9c32ed8da2baff 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js
@@ -780,6 +780,7 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor
this.setLeadingIcons([icon]);
/** @type {?SDK.ServiceWorkerCacheModel} */
this._swCacheModel = null;
+ this._view = null;
}
/**
@@ -818,6 +819,19 @@ Resources.ServiceWorkerCacheTreeElement = class extends Resources.StorageCategor
this._swCacheModel.refreshCacheNames();
}
+ /**
+ * @override
+ * @return {boolean}
+ */
+ onselect(selectedByUser) {
+ super.onselect(selectedByUser);
+ if (!this._view)
+ this._view = new Resources.ServiceWorkerCategoryView(this._refreshCaches.bind(this));
+
+ this.showView(this._view);
+ return false;
+ }
+
/**
* @param {!Common.Event} event
*/
@@ -1051,6 +1065,7 @@ Resources.IndexedDBTreeElement = class extends Resources.StorageCategoryTreeElem
super(storagePanel, Common.UIString('IndexedDB'), 'IndexedDB');
var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
this.setLeadingIcons([icon]);
+ this._view = null;
}
_initialize() {
@@ -1089,6 +1104,19 @@ Resources.IndexedDBTreeElement = class extends Resources.StorageCategoryTreeElem
indexedDBModel.refreshDatabaseNames();
}
+ /**
+ * @override
+ * @return {boolean}
+ */
+ onselect(selectedByUser) {
+ super.onselect(selectedByUser);
+ if (!this._view)
+ this._view = new Resources.IDBCategoryView(this.refreshIndexedDB.bind(this));
+
+ this.showView(this._view);
+ return false;
+ }
+
/**
* @param {!Common.Event} event
*/

Powered by Google App Engine
This is Rietveld 408576698