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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 334047: Lands http://codereview.chromium.org/291006 for Pierre:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | chrome/browser/views/bookmark_menu_controller_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 30214)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -229,9 +229,15 @@
}
virtual bool IsTriggerableEvent(const views::MouseEvent& e) {
- // This is hard coded to avoid potential notification on left mouse down,
- // which we want to show the menu.
- return e.IsMiddleMouseButton();
+ // Left clicks should show the menu contents and right clicks should show
+ // the context menu. They should not trigger the opening of underlying urls.
+ if (e.GetFlags() == views::MouseEvent::EF_LEFT_BUTTON_DOWN ||
+ e.GetFlags() == views::MouseEvent::EF_RIGHT_BUTTON_DOWN)
+ return false;
+
+ WindowOpenDisposition disposition(
+ event_utils::DispositionFromEventFlags(e.GetFlags()));
+ return disposition != CURRENT_TAB;
}
virtual void Paint(gfx::Canvas *canvas) {
« no previous file with comments | « no previous file | chrome/browser/views/bookmark_menu_controller_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698