From 2e1f49096ed49419de8c740a20ab106c14ffbf44 Mon Sep 17 00:00:00 2001 From: "sky@google.com" Date: Mon, 8 Sep 2008 14:46:36 +0000 Subject: This patch is from Andrew Brampton . This patches allows menu items in PopUpMenus to be clicked with the right mouse button. menu.cc controls the web content popup menus, and some others chrome_menu{.cc,.h} controls popup menu on the chrome, for example right clicking on a tab. BUG=718 TEST=Bring up any menu (wrench/document) and right click on one of the items. This should select the item. Try the same with any of the bookmark menus. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1838 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/chrome_menu.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'chrome/views/chrome_menu.h') diff --git a/chrome/views/chrome_menu.h b/chrome/views/chrome_menu.h index a017b3d..05cce11 100644 --- a/chrome/views/chrome_menu.h +++ b/chrome/views/chrome_menu.h @@ -72,11 +72,13 @@ class MenuDelegate : Controller { // If this is not the result of a mouse gesture x/y is the recommended // location to display the content menu at. In either case, x/y is in // screen coordinates. - virtual void ShowContextMenu(MenuItemView* source, + // Returns true if a context menu was displayed, otherwise false + virtual bool ShowContextMenu(MenuItemView* source, int id, int x, int y, bool is_mouse_gesture) { + return false; } // Controller @@ -101,9 +103,9 @@ class MenuDelegate : Controller { } // Returns true if the specified mouse event is one the user can use - // to trigger, or accept, the mouse. Defaults to only left mouse buttons. + // to trigger, or accept, the mouse. Defaults to left or right mouse buttons. virtual bool IsTriggerableEvent(const MouseEvent& e) { - return e.IsLeftMouseButton(); + return e.IsLeftMouseButton() || e.IsRightMouseButton(); } // Invoked to determine if drops can be accepted for a submenu. This is -- cgit v1.1