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

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

Issue 2421323002: Created new account type for ARC++ kiosk. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/metrics/user_metrics_recorder.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/common/system/user/tray_user.h" 5 #include "ash/common/system/user/tray_user.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 need_avatar = true; 137 need_avatar = true;
138 break; 138 break;
139 case LoginStatus::SUPERVISED: 139 case LoginStatus::SUPERVISED:
140 need_avatar = true; 140 need_avatar = true;
141 need_label = true; 141 need_label = true;
142 break; 142 break;
143 case LoginStatus::GUEST: 143 case LoginStatus::GUEST:
144 need_label = true; 144 need_label = true;
145 break; 145 break;
146 case LoginStatus::KIOSK_APP: 146 case LoginStatus::KIOSK_APP:
147 case LoginStatus::ARC_KIOSK_APP:
147 case LoginStatus::NOT_LOGGED_IN: 148 case LoginStatus::NOT_LOGGED_IN:
148 break; 149 break;
149 } 150 }
150 151
151 if ((need_avatar != (avatar_ != nullptr)) || 152 if ((need_avatar != (avatar_ != nullptr)) ||
152 (need_label != (label_ != nullptr))) { 153 (need_label != (label_ != nullptr))) {
153 layout_view_->RemoveAllChildViews(true); 154 layout_view_->RemoveAllChildViews(true);
154 if (need_label) { 155 if (need_label) {
155 label_ = new views::Label; 156 label_ = new views::Label;
156 SetupLabelForTray(label_); 157 SetupLabelForTray(label_);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Unit tests might come here with no images for some users. 276 // Unit tests might come here with no images for some users.
276 if (avatar_->size().IsEmpty()) 277 if (avatar_->size().IsEmpty())
277 avatar_->SetSize(gfx::Size(kTrayItemSize, kTrayItemSize)); 278 avatar_->SetSize(gfx::Size(kTrayItemSize, kTrayItemSize));
278 } 279 }
279 280
280 void TrayUser::UpdateLayoutOfItem() { 281 void TrayUser::UpdateLayoutOfItem() {
281 UpdateAfterShelfAlignmentChange(system_tray()->shelf_alignment()); 282 UpdateAfterShelfAlignmentChange(system_tray()->shelf_alignment());
282 } 283 }
283 284
284 } // namespace ash 285 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/metrics/user_metrics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698