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

Unified Diff: chrome/browser/ui/views/browser_action_view.cc

Issue 12529012: Context menu on views must show on mouse down for non-WIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 8 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: chrome/browser/ui/views/browser_action_view.cc
diff --git a/chrome/browser/ui/views/browser_action_view.cc b/chrome/browser/ui/views/browser_action_view.cc
index 7a8a81ef112bd77d42c6ea474a75a621e6945147..05dd725fa2943bce010f65d285ce8e1df938d13c 100644
--- a/chrome/browser/ui/views/browser_action_view.cc
+++ b/chrome/browser/ui/views/browser_action_view.cc
@@ -314,10 +314,12 @@ bool BrowserActionButton::OnMousePressed(const ui::MouseEvent& event) {
TextButton::OnMousePressed(event);
}
- // See comments in MenuButton::Activate() as to why this is needed.
- SetMouseHandler(NULL);
+ if (!views::View::ShouldShowContextMenuOnMousePress()) {
+ // See comments in MenuButton::Activate() as to why this is needed.
+ SetMouseHandler(NULL);
- ShowContextMenu(gfx::Point(), true);
+ ShowContextMenu(gfx::Point(), true);
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698