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

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

Issue 2632553002: [DevTools] Clear local storage (Closed)
Patch Set: [DevTools] Clear local storage Created 3 years, 11 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 de4043087fd4342c1da10823079617c4d12179cb..65a73cf6bdfaa0bae5eb008a23aa361f250f6fd8 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -79,8 +79,8 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar {
this.resourcesListTreeElement = 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.storageViews = mainContainer.element.createChild('div', 'vbox flex-auto');
this.splitWidget().setMainWidget(mainContainer);
/** @type {!Map.<!Resources.Database, !Object.<string, !Resources.DatabaseTableView>>} */
@@ -1902,6 +1902,20 @@ Resources.DOMStorageTreeElement = class extends Resources.BaseStorageTreeElement
this._storagePanel._showDOMStorage(this._domStorage);
return false;
}
+
+ /**
+ * @override
+ */
+ onattach() {
+ super.onattach();
+ this.listItemElement.addEventListener('contextmenu', this._handleContextMenuEvent.bind(this), true);
+ }
+
+ _handleContextMenuEvent(event) {
+ var contextMenu = new UI.ContextMenu(event);
+ contextMenu.appendItem(Common.UIString('Clear'), () => this._domStorage.clear());
+ contextMenu.show();
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698