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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js

Issue 2142303002: Revert of DevTools: automatically populate 'More tools' submenu with the drawer views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/ui/ContextMenu.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js b/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js
index c48d5c8701508976d5c9ac7a935943ec6224be5b..b46e31b1d92bb7b024be40c34cad56ee1f7b6c04 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js
@@ -171,14 +171,11 @@
/**
* @param {string} label
* @param {boolean=} disabled
- * @param {string=} subMenuId
* @return {!WebInspector.ContextSubMenuItem}
*/
- appendSubMenuItem: function(label, disabled, subMenuId)
+ appendSubMenuItem: function(label, disabled)
{
var item = new WebInspector.ContextSubMenuItem(this._contextMenu, label, disabled);
- if (subMenuId)
- this._contextMenu._namedSubMenus.set(subMenuId, item);
this._pushItem(item);
return item;
},
@@ -249,7 +246,7 @@
{
var subMenuId = extension.descriptor()["subMenuId"];
if (subMenuId) {
- var subMenuItem = menu.appendSubMenuItem(extension.title(), false, subMenuId);
+ var subMenuItem = menu.appendSubMenuItem(extension.title(WebInspector.platform()));
subMenuItem.appendItemsAtLocation(subMenuId);
} else {
menu.appendAction(extension.descriptor()["actionId"]);
@@ -312,8 +309,6 @@
this._y = y === undefined ? event.y : y;
this._handlers = {};
this._id = 0;
- /** @type {!Map<string, !WebInspector.ContextSubMenuItem>} */
- this._namedSubMenus = new Map();
}
WebInspector.ContextMenu.initialize = function()
@@ -488,15 +483,6 @@
this._pendingTargets.push(target);
},
- /**
- * @param {string} name
- * @return {?WebInspector.ContextSubMenuItem}
- */
- namedSubMenu: function(name)
- {
- return this._namedSubMenus.get(name) || null;
- },
-
__proto__: WebInspector.ContextSubMenuItem.prototype
}

Powered by Google App Engine
This is Rietveld 408576698