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

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

Issue 869793004: Bring up the Fast User Switcher on Shift+Click on the new Avatar Button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser tests Created 5 years, 11 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 0482cbc6b975c0c84aea88c212c23b83a6dafbda..e1c201513d5cf2da6cb243531fccd3d75e787d12 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
@@ -210,8 +210,14 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver,
}
- (IBAction)buttonClicked:(id)sender {
+ BrowserWindow::AvatarBubbleMode mode =
+ BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
+
+ if([NSEvent modifierFlags] & NSCommandKeyMask)
Alexei Svitkine (slow) 2015/02/02 17:22:30 Nit: space after if
anthonyvd 2015/02/03 21:53:20 Done.
+ mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH;
+
[self showAvatarBubbleAnchoredAt:button_
- withMode:BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT
+ withMode:mode
withServiceType:signin::GAIA_SERVICE_TYPE_NONE];
}

Powered by Google App Engine
This is Rietveld 408576698