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

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

Issue 1563113002: DevTools: add a navigator menu with grouping options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/ui/Toolbar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
index 98900e554d5f6a686de5de5ab1a68945f10e8b30..c68fa0ca45ee0d312207fcf5e7130a63b2abd0eb 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
@@ -615,11 +615,13 @@ WebInspector.Toolbar.createActionButton = function(action, toggledOptions, untog
* @constructor
* @extends {WebInspector.ToolbarButton}
* @param {function(!WebInspector.ContextMenu)} contextMenuHandler
+ * @param {boolean=} useSoftMenu
*/
-WebInspector.ToolbarMenuButton = function(contextMenuHandler)
+WebInspector.ToolbarMenuButton = function(contextMenuHandler, useSoftMenu)
{
WebInspector.ToolbarButton.call(this, "", "menu-toolbar-item");
this._contextMenuHandler = contextMenuHandler;
+ this._useSoftMenu = !!useSoftMenu;
}
WebInspector.ToolbarMenuButton.prototype = {
@@ -630,7 +632,7 @@ WebInspector.ToolbarMenuButton.prototype = {
_clicked: function(event)
{
var contextMenu = new WebInspector.ContextMenu(event,
- false,
+ this._useSoftMenu,
this.element.totalOffsetLeft(),
this.element.totalOffsetTop() + this.element.offsetHeight);
this._contextMenuHandler(contextMenu);

Powered by Google App Engine
This is Rietveld 408576698