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

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: Rebase before submit 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
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 befd61c14cc4fbffde68d1d0b2431d0d4f5abc4d..66a424ad327b0aeb50b151867c7b65c4f1ac496d 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)
+ 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];
}
« no previous file with comments | « chrome/browser/ui/browser_window.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698