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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js

Issue 2447933002: [Devtools] Restructured contextMenu for DataGrid. (Closed)
Patch Set: changes Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js b/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
index 01fbd9899539405c5d4ea92631ab8ca8e7741423..4017093594261f4b3c8394e76c4e44ad1e8fcab8 100644
--- a/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
+++ b/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
@@ -54,10 +54,12 @@ WebInspector.CookiesTable = function(expandable, refreshCallback, selectedCallba
{id: "sameSite", title: WebInspector.UIString("SameSite"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
]);
- if (readOnly)
+ if (readOnly) {
this._dataGrid = new WebInspector.DataGrid(columns);
- else
- this._dataGrid = new WebInspector.DataGrid(columns, undefined, this._onDeleteCookie.bind(this), refreshCallback, this._onContextMenu.bind(this));
+ } else {
+ this._dataGrid = new WebInspector.DataGrid(columns, undefined, this._onDeleteCookie.bind(this), refreshCallback);
+ this._dataGrid.setRowContextMenuCallback(this._onRowContextMenu.bind(this));
+ }
this._dataGrid.setName("cookiesTable");
this._dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._rebuildTable, this);
@@ -85,12 +87,11 @@ WebInspector.CookiesTable.prototype = {
* @param {!WebInspector.ContextMenu} contextMenu
* @param {!WebInspector.DataGridNode} node
*/
- _onContextMenu: function(contextMenu, node)
+ _onRowContextMenu: function(contextMenu, node)
{
if (node === this._dataGrid.creationNode)
return;
- var cookie = node.cookie;
- var domain = cookie.domain();
+ var domain = node.cookie.domain();
if (domain)
contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^all from \"%s\"", domain), this._clearAndRefresh.bind(this, domain));
contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^all"), this._clearAndRefresh.bind(this, null));
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698