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

Unified Diff: chrome/browser/ui/views/profiles/new_avatar_button.cc

Issue 1257343002: GestureLongPress should be able to invoke BUBBLE_MODE_FAST_USER_SWITCH. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle windows pathway. Created 5 years, 5 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 | « chrome/browser/ui/views/profiles/new_avatar_button.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/profiles/new_avatar_button.cc
diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.cc b/chrome/browser/ui/views/profiles/new_avatar_button.cc
index 3902505d01839f1b4be6d4350ccfca162c93ed0d..9126de6a4c53c2c6853fe0640f3efb3a3b07f5d0 100644
--- a/chrome/browser/ui/views/profiles/new_avatar_button.cc
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.cc
@@ -132,6 +132,17 @@ void NewAvatarButton::OnMouseReleased(const ui::MouseEvent& event) {
LabelButton::OnMouseReleased(event);
}
+void NewAvatarButton::OnGestureEvent(ui::GestureEvent* event) {
+ // TODO(wjmaclean): The check for ET_GESTURE_LONG_PRESS is done here since
+ // no other UI button based on CustomButton appears to handle mouse
+ // right-click. If other cases are identified, it may make sense to move this
+ // check to CustomButton.
+ if (event->type() == ui::ET_GESTURE_LONG_PRESS)
+ NotifyClick(*event);
+ else
+ LabelButton::OnGestureEvent(event);
+}
+
void NewAvatarButton::OnProfileAdded(const base::FilePath& profile_path) {
Update();
}
« no previous file with comments | « chrome/browser/ui/views/profiles/new_avatar_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698