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

Unified Diff: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm

Issue 916523003: Bring up fast user switcher on right-click of the avatar menu on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/cocoa/profiles/avatar_base_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
index 66a424ad327b0aeb50b151867c7b65c4f1ac496d..00cb1b3f3749e889836d8ca0177f7f2a825c3f0a 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
@@ -33,6 +33,7 @@ const CGFloat kMenuXOffsetAdjust = 2.0;
@interface AvatarBaseController (Private)
// Shows the avatar bubble.
- (IBAction)buttonClicked:(id)sender;
+- (IBAction)buttonRightClicked:(id)sender;
- (void)bubbleWillClose:(NSNotification*)notif;
@@ -213,8 +214,14 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver,
BrowserWindow::AvatarBubbleMode mode =
BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
- if ([NSEvent modifierFlags] & NSCommandKeyMask)
- mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH;
+ [self showAvatarBubbleAnchoredAt:button_
+ withMode:mode
+ withServiceType:signin::GAIA_SERVICE_TYPE_NONE];
+}
+
+- (IBAction)buttonRightClicked:(id)sender {
+ BrowserWindow::AvatarBubbleMode mode =
+ BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH;
[self showAvatarBubbleAnchoredAt:button_
withMode:mode
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/profiles/avatar_button.h » ('j') | chrome/browser/ui/cocoa/profiles/avatar_button.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698