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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm

Issue 316863002: Rename "managed (mode|user)" to "supervised user" (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_button_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/profiles/profiles_state.h" 9 #include "chrome/browser/profiles/profiles_state.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } else if (!isThemedWindow_) { 201 } else if (!isThemedWindow_) {
202 foregroundColor = [NSColor blackColor]; 202 foregroundColor = [NSColor blackColor];
203 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.7]]; 203 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.7]];
204 } else { 204 } else {
205 foregroundColor = [NSColor blackColor]; 205 foregroundColor = [NSColor blackColor];
206 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.4]]; 206 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.4]];
207 } 207 }
208 208
209 base::string16 profileName = [self getElidedAvatarName]; 209 base::string16 profileName = [self getElidedAvatarName];
210 NSString* buttonTitle = nil; 210 NSString* buttonTitle = nil;
211 if (browser_->profile()->IsManaged()) { 211 if (browser_->profile()->IsSupervised()) {
212 // Add the "supervised" label after eliding the profile name, so the label 212 // Add the "supervised" label after eliding the profile name, so the label
213 // will not get elided, but will instead enlarge the button. 213 // will not get elided, but will instead enlarge the button.
214 buttonTitle = l10n_util::GetNSStringF(IDS_MANAGED_USER_NEW_AVATAR_LABEL, 214 buttonTitle = l10n_util::GetNSStringF(IDS_MANAGED_USER_NEW_AVATAR_LABEL,
215 profileName); 215 profileName);
216 } else { 216 } else {
217 buttonTitle = base::SysUTF16ToNSString(profileName); 217 buttonTitle = base::SysUTF16ToNSString(profileName);
218 } 218 }
219 219
220 base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( 220 base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
221 [[NSMutableParagraphStyle alloc] init]); 221 [[NSMutableParagraphStyle alloc] init]);
(...skipping 11 matching lines...) Expand all
233 if (layoutParent) { 233 if (layoutParent) {
234 // Because the width of the button might have changed, the parent browser 234 // Because the width of the button might have changed, the parent browser
235 // frame needs to recalculate the button bounds and redraw it. 235 // frame needs to recalculate the button bounds and redraw it.
236 [[BrowserWindowController 236 [[BrowserWindowController
237 browserWindowControllerForWindow:browser_->window()->GetNativeWindow()] 237 browserWindowControllerForWindow:browser_->window()->GetNativeWindow()]
238 layoutSubviews]; 238 layoutSubviews];
239 } 239 }
240 } 240 }
241 241
242 @end 242 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.cc ('k') | chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698