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

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

Issue 2552423002: [Mac] Fix for avatar button active state (Closed)
Patch Set: Removed the Fast Chooser Profile Menu code in cocoa Created 4 years 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_button_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
index 13e7fab50156145572600031057f433514afeca8..7bc7e0dd7f0162018f57e0037d74d6c5edac8d4e 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
@@ -185,7 +185,7 @@ const CGFloat kTitleKern = 0.25;
[avatarButton setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
[avatarButton setTarget:self];
[avatarButton setAction:@selector(buttonClicked:)];
- [avatarButton setRightAction:@selector(buttonRightClicked:)];
+ [avatarButton setRightAction:@selector(buttonClicked:)];
// Check if the account already has an authentication or sync error and
// initialize the avatar button UI.
@@ -298,12 +298,13 @@ const CGFloat kTitleKern = 0.25;
withMode:(BrowserWindow::AvatarBubbleMode)mode
withServiceType:(signin::GAIAServiceType)serviceType
fromAccessPoint:(signin_metrics::AccessPoint)accessPoint {
- AvatarButton* button = base::mac::ObjCCastStrict<AvatarButton>(button_);
- [button setIsActive:YES];
[super showAvatarBubbleAnchoredAt:anchor
withMode:mode
withServiceType:serviceType
fromAccessPoint:accessPoint];
+
+ AvatarButton* button = base::mac::ObjCCastStrict<AvatarButton>(button_);
+ [button setIsActive:[[menuController_ window] isVisible]];
}
- (void)bubbleWillClose:(NSNotification*)notif {

Powered by Google App Engine
This is Rietveld 408576698