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

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: Add unit test. 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser/avatar_button_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e3830a880aafdce9017be4683ee55ef002f7bb11 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,19 @@ class Observer;
// The menu controller, if the menu is open.
__weak AvatarMenuBubbleController* menuController_;
+
+ // The avatar button.
+ scoped_nsobject<NSButton> button_;
+
+ // The managed user avatar label. Only used for managed user profiles.
+ scoped_nsobject<NSTextField> label_;
}
-// The view cast to a button.
-@property (readonly, nonatomic) NSButton* buttonView;
+// The avatar button view.
+@property(readonly, nonatomic) NSButton* buttonView;
+
+// The managed user avatar label view.
+@property(readonly, nonatomic) NSTextField* labelView;
// Designated initializer.
- (id)initWithBrowser:(Browser*)browser;
@@ -41,6 +55,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;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser/avatar_button_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698