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

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

Issue 297193003: New avatar menu: Add icon for supervised users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New resources Created 6 years, 7 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/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index ea26e90dc3ef73cd94a95cf74770d8392f846bab..733f9e333f2c23a1f239576dced82398aec2b0b8 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -1252,6 +1252,20 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
[container addSubview:iconView];
yOffset = NSMaxY([iconView frame]);
+ if (browser_->profile()->IsManaged()) {
+ base::scoped_nsobject<NSImageView> supervisedIcon(
msw 2014/06/02 21:18:15 nit: it'd be nice to have consistent terminology (
Marc Treib 2014/06/03 08:26:02 Very true. The correct term would be "supervised"
+ [[NSImageView alloc] initWithFrame:NSZeroRect]);
+ ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
+ [supervisedIcon setImage:rb->GetNativeImageNamed(
+ IDR_ICON_PROFILES_MENU_SUPERVISED).ToNSImage()];
+ NSSize size = [[supervisedIcon image] size];
+ [supervisedIcon setFrameSize:size];
+ NSRect parentFrame = [iconView frame];
+ [supervisedIcon setFrameOrigin:NSMakePoint(NSMaxX(parentFrame) - size.width,
+ NSMinY(parentFrame))];
+ [container addSubview:supervisedIcon];
+ }
+
if (switches::IsNewProfileManagementPreviewEnabled()) {
base::scoped_nsobject<HoverImageButton> questionButton(
[[HoverImageButton alloc] initWithFrame:NSZeroRect]);

Powered by Google App Engine
This is Rietveld 408576698