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

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

Issue 2459073003: [Mac] Implement an active state for the avatar button (Closed)
Patch Set: Updated comment Created 4 years, 2 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_button.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button.mm b/chrome/browser/ui/cocoa/profiles/avatar_button.mm
index a1d5c12c1c0122bfd5661dfa6b51480b16aa304c..616d7ac13ca267faf3c752ad322d7d526259d0a9 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_button.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_button.mm
@@ -13,6 +13,8 @@
@implementation AvatarButton
+@synthesize isActive = isActive_;
+
// Overrides -rightMouseDown and implements a custom mouse tracking loop.
- (void)rightMouseDown:(NSEvent*)event {
NSEvent* nextEvent = event;
@@ -45,4 +47,10 @@
rightAction_ = selector;
}
+- (void)setIsActive:(BOOL)isActive {
+ BOOL activeChanged = isActive_ != isActive;
+ isActive_ = isActive;
+ [self setNeedsDisplay:activeChanged];
+}
+
@end
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_button.h ('k') | chrome/browser/ui/cocoa/profiles/avatar_button_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698