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

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

Issue 1872673002: DevTools: introduce the bypass service worker checkbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
index eba4a9b5940d1ff336217eb60e5593a8d5a994a4..0d4f2a686e4e5052e8b35f8163007f4aee07fc24 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -217,7 +217,7 @@ WebInspector.ResourcesPanel.prototype = {
this.cookieListTreeElement.removeChildren();
this.cacheStorageListTreeElement.removeChildren();
- if (this.visibleView && !(this.visibleView instanceof WebInspector.StorageCategoryView))
+ if (this.visibleView && !(this.visibleView instanceof WebInspector.StorageCategoryView) && !(this.visibleView instanceof WebInspector.ServiceWorkersView))
this.visibleView.detach();
this._storageViewToolbar.removeToolbarItems();
@@ -1513,29 +1513,37 @@ WebInspector.SWCacheTreeElement.prototype = {
/**
* @constructor
- * @extends {WebInspector.StorageCategoryTreeElement}
+ * @extends {WebInspector.BaseStorageTreeElement}
* @param {!WebInspector.ResourcesPanel} storagePanel
*/
WebInspector.ServiceWorkersTreeElement = function(storagePanel)
{
- WebInspector.StorageCategoryTreeElement.call(this, storagePanel, WebInspector.UIString("Service Workers"), "Service Workers", ["service-workers-tree-item"]);
+ WebInspector.BaseStorageTreeElement.call(this, storagePanel, "Service Workers", ["service-workers-tree-item"], false);
}
WebInspector.ServiceWorkersTreeElement.prototype = {
/**
+ * @return {string}
+ */
+ get itemURL()
+ {
+ return "service-workers://";
+ },
+
+ /**
* @override
* @return {boolean}
*/
onselect: function(selectedByUser)
{
- WebInspector.StorageCategoryTreeElement.prototype.onselect.call(this, selectedByUser);
+ WebInspector.BaseStorageTreeElement.prototype.onselect.call(this, selectedByUser);
if (!this._view)
this._view = new WebInspector.ServiceWorkersView();
this._storagePanel.showServiceWorkersView(this._view);
return false;
},
- __proto__: WebInspector.StorageCategoryTreeElement.prototype
+ __proto__: WebInspector.BaseStorageTreeElement.prototype
}

Powered by Google App Engine
This is Rietveld 408576698