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

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

Issue 11365046: Redirect behaviour of gesture events on browser action buttons appropriately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style. Created 8 years, 1 month 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 | « chrome/browser/ui/views/browser_action_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0fb725af61e957a4c1f5b2372e15f03332634d46..3e96b40313232695fcdb7e9a128c353c696d27f1 100644
--- a/chrome/browser/ui/views/browser_action_view.cc
+++ b/chrome/browser/ui/views/browser_action_view.cc
@@ -312,8 +312,8 @@ bool BrowserActionButton::Activate() {
bool BrowserActionButton::OnMousePressed(const ui::MouseEvent& event) {
if (!event.IsRightMouseButton()) {
- return IsPopup() ? MenuButton::OnMousePressed(event)
- : TextButton::OnMousePressed(event);
+ return IsPopup() ? MenuButton::OnMousePressed(event) :
+ TextButton::OnMousePressed(event);
}
// See comments in MenuButton::Activate() as to why this is needed.
@@ -341,8 +341,13 @@ void BrowserActionButton::OnMouseExited(const ui::MouseEvent& event) {
}
bool BrowserActionButton::OnKeyReleased(const ui::KeyEvent& event) {
- return IsPopup() ? MenuButton::OnKeyReleased(event)
- : TextButton::OnKeyReleased(event);
+ return IsPopup() ? MenuButton::OnKeyReleased(event) :
+ TextButton::OnKeyReleased(event);
+}
+
+ui::EventResult BrowserActionButton::OnGestureEvent(ui::GestureEvent* event) {
+ return IsPopup() ? MenuButton::OnGestureEvent(event) :
+ TextButton::OnGestureEvent(event);
}
bool BrowserActionButton::AcceleratorPressed(
« no previous file with comments | « chrome/browser/ui/views/browser_action_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698