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

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: Change to right click and port to Mac UI 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..b1819a6dbb3f70d281758b22926ece18a14e7ebc 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
@@ -210,8 +210,15 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver,
}
- (IBAction)buttonClicked:(id)sender {
+ BrowserWindow::AvatarBubbleMode mode =
+ BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
Roger Tawa OOO till Jul 10th 2015/01/29 23:00:35 Two spaces.
anthonyvd 2015/01/30 15:02:20 Done.
+
+ if([NSEvent modifierFlags] & NSCommandKeyMask) {
+ mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH;
+ }
Roger Tawa OOO till Jul 10th 2015/01/29 23:00:35 No need for { and }
anthonyvd 2015/01/30 15:02:20 Done.
+
[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