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

Unified Diff: chrome/browser/ui/cocoa/browser/avatar_button_controller.h

Issue 15932008: Add managed user avatar menu for mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 7 years, 6 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/browser/avatar_button_controller.h
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
index 776573c75a3b754b8189d0db0334fd00ddc8dc58..b6840130d5c5f2a92b35d96cb69055448ed940eb 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h
@@ -7,6 +7,7 @@
#import <AppKit/AppKit.h>
+#import "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
@class AvatarMenuBubbleController;
@@ -16,6 +17,10 @@ namespace AvatarButtonControllerInternal {
class Observer;
}
+namespace ui {
+class ThemeProvider;
+}
+
// This view controller manages the button/image that sits in the top of the
// window frame when using multi-profiles. It shows the current profile's
// avatar, or, when in Incognito, the spy dude. With multi-profiles, clicking
@@ -29,10 +34,16 @@ class Observer;
// The menu controller, if the menu is open.
__weak AvatarMenuBubbleController* menuController_;
+
+ // The managed user avatar label.
+ scoped_nsobject<NSTextField> label_;
}
// The view cast to a button.
-@property (readonly, nonatomic) NSButton* buttonView;
+@property(readonly, nonatomic) NSButton* buttonView;
+
+// The managed user avatar label.
+@property(readonly, nonatomic) NSTextField* labelView;
// Designated initializer.
- (id)initWithBrowser:(Browser*)browser;
@@ -41,6 +52,10 @@ class Observer;
// and will be resized to the frame of the button.
- (void)setImage:(NSImage*)image;
+// Updates the text color and the background color of the avatar label
+// according to the chosen theme.
+- (void)updateColors:(ui::ThemeProvider*)themeProvider;
+
// Shows the avatar bubble.
- (void)showAvatarBubble;

Powered by Google App Engine
This is Rietveld 408576698