| OLD | NEW |
| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 if (need_avatar) { | 167 if (need_avatar) { |
| 168 avatar_ = new tray::RoundedImageView(kTrayAvatarCornerRadius, true); | 168 avatar_ = new tray::RoundedImageView(kTrayAvatarCornerRadius, true); |
| 169 layout_view_->AddChildView(avatar_); | 169 layout_view_->AddChildView(avatar_); |
| 170 } else { | 170 } else { |
| 171 avatar_ = NULL; | 171 avatar_ = NULL; |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 if (status == user::LOGGED_IN_SUPERVISED) { | 175 if (status == user::LOGGED_IN_SUPERVISED) { |
| 176 label_->SetText( | 176 label_->SetText( |
| 177 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL)); | 177 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL)); |
| 178 } else if (status == user::LOGGED_IN_GUEST) { | 178 } else if (status == user::LOGGED_IN_GUEST) { |
| 179 label_->SetText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); | 179 label_->SetText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 if (avatar_) { | 182 if (avatar_) { |
| 183 avatar_->SetCornerRadii( | 183 avatar_->SetCornerRadii( |
| 184 0, kTrayAvatarCornerRadius, kTrayAvatarCornerRadius, 0); | 184 0, kTrayAvatarCornerRadius, kTrayAvatarCornerRadius, 0); |
| 185 avatar_->SetBorder(views::Border::NullBorder()); | 185 avatar_->SetBorder(views::Border::NullBorder()); |
| 186 } | 186 } |
| 187 UpdateAvatarImage(status); | 187 UpdateAvatarImage(status); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void TrayUser::UpdateLayoutOfItem() { | 287 void TrayUser::UpdateLayoutOfItem() { |
| 288 RootWindowController* controller = GetRootWindowController( | 288 RootWindowController* controller = GetRootWindowController( |
| 289 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); | 289 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); |
| 290 if (controller && controller->shelf()) { | 290 if (controller && controller->shelf()) { |
| 291 UpdateAfterShelfAlignmentChange( | 291 UpdateAfterShelfAlignmentChange( |
| 292 controller->GetShelfLayoutManager()->GetAlignment()); | 292 controller->GetShelfLayoutManager()->GetAlignment()); |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace ash | 296 } // namespace ash |
| OLD | NEW |