| 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 73c774c8ddfb3c0e519fe23b1a20c10d54e4fe0e..13e7fab50156145572600031057f433514afeca8 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
|
| @@ -103,11 +103,11 @@ const CGFloat kTitleKern = 0.25;
|
|
|
| - (void)drawBezelWithFrame:(NSRect)frame
|
| inView:(NSView*)controlView {
|
| - HoverState hoverState =
|
| - [base::mac::ObjCCastStrict<AvatarButton>(controlView) hoverState];
|
| + AvatarButton* button = base::mac::ObjCCastStrict<AvatarButton>(controlView);
|
| + HoverState hoverState = [button hoverState];
|
|
|
| NSColor* backgroundColor = nil;
|
| - if (hoverState == kHoverStateMouseDown) {
|
| + if (hoverState == kHoverStateMouseDown || [button isActive]) {
|
| backgroundColor = skia::SkColorToSRGBNSColor(kButtonPressedColor);
|
| } else if (hoverState == kHoverStateMouseOver) {
|
| backgroundColor = skia::SkColorToSRGBNSColor(kButtonHoverColor);
|
| @@ -294,4 +294,22 @@ const CGFloat kTitleKern = 0.25;
|
| [self updateAvatarButtonAndLayoutParent:YES];
|
| }
|
|
|
| +- (void)showAvatarBubbleAnchoredAt:(NSView*)anchor
|
| + 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];
|
| +}
|
| +
|
| +- (void)bubbleWillClose:(NSNotification*)notif {
|
| + AvatarButton* button = base::mac::ObjCCastStrict<AvatarButton>(button_);
|
| + [button setIsActive:NO];
|
| + [super bubbleWillClose:notif];
|
| +}
|
| +
|
| @end
|
|
|