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

Side by Side Diff: ash/system/user/tray_user.cc

Issue 393343002: Rename "managed (mode|user)" to "supervised user" (part 7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more alphabetize (and rebase again) Created 6 years, 5 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
« no previous file with comments | « ash/system/user/login_status.h ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ash/system/user/tray_user.h" 5 #include "ash/system/user/tray_user.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return; 133 return;
134 bool need_label = false; 134 bool need_label = false;
135 bool need_avatar = false; 135 bool need_avatar = false;
136 switch (status) { 136 switch (status) {
137 case user::LOGGED_IN_LOCKED: 137 case user::LOGGED_IN_LOCKED:
138 case user::LOGGED_IN_USER: 138 case user::LOGGED_IN_USER:
139 case user::LOGGED_IN_OWNER: 139 case user::LOGGED_IN_OWNER:
140 case user::LOGGED_IN_PUBLIC: 140 case user::LOGGED_IN_PUBLIC:
141 need_avatar = true; 141 need_avatar = true;
142 break; 142 break;
143 case user::LOGGED_IN_LOCALLY_MANAGED: 143 case user::LOGGED_IN_SUPERVISED:
144 need_avatar = true; 144 need_avatar = true;
145 need_label = true; 145 need_label = true;
146 break; 146 break;
147 case user::LOGGED_IN_GUEST: 147 case user::LOGGED_IN_GUEST:
148 need_label = true; 148 need_label = true;
149 break; 149 break;
150 case user::LOGGED_IN_RETAIL_MODE: 150 case user::LOGGED_IN_RETAIL_MODE:
151 case user::LOGGED_IN_KIOSK_APP: 151 case user::LOGGED_IN_KIOSK_APP:
152 case user::LOGGED_IN_NONE: 152 case user::LOGGED_IN_NONE:
153 break; 153 break;
(...skipping 10 matching lines...) Expand all
164 label_ = NULL; 164 label_ = NULL;
165 } 165 }
166 if (need_avatar) { 166 if (need_avatar) {
167 avatar_ = new tray::RoundedImageView(kTrayAvatarCornerRadius, true); 167 avatar_ = new tray::RoundedImageView(kTrayAvatarCornerRadius, true);
168 layout_view_->AddChildView(avatar_); 168 layout_view_->AddChildView(avatar_);
169 } else { 169 } else {
170 avatar_ = NULL; 170 avatar_ = NULL;
171 } 171 }
172 } 172 }
173 173
174 if (status == user::LOGGED_IN_LOCALLY_MANAGED) { 174 if (status == user::LOGGED_IN_SUPERVISED) {
175 label_->SetText( 175 label_->SetText(
176 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL)); 176 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL));
177 } else if (status == user::LOGGED_IN_GUEST) { 177 } else if (status == user::LOGGED_IN_GUEST) {
178 label_->SetText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); 178 label_->SetText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL));
179 } 179 }
180 180
181 if (avatar_) { 181 if (avatar_) {
182 avatar_->SetCornerRadii( 182 avatar_->SetCornerRadii(
183 0, kTrayAvatarCornerRadius, kTrayAvatarCornerRadius, 0); 183 0, kTrayAvatarCornerRadius, kTrayAvatarCornerRadius, 0);
184 avatar_->SetBorder(views::Border::NullBorder()); 184 avatar_->SetBorder(views::Border::NullBorder());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 void TrayUser::UpdateLayoutOfItem() { 286 void TrayUser::UpdateLayoutOfItem() {
287 RootWindowController* controller = GetRootWindowController( 287 RootWindowController* controller = GetRootWindowController(
288 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); 288 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow());
289 if (controller && controller->shelf()) { 289 if (controller && controller->shelf()) {
290 UpdateAfterShelfAlignmentChange( 290 UpdateAfterShelfAlignmentChange(
291 controller->GetShelfLayoutManager()->GetAlignment()); 291 controller->GetShelfLayoutManager()->GetAlignment());
292 } 292 }
293 } 293 }
294 294
295 } // namespace ash 295 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/login_status.h ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698