| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 case user::LOGGED_IN_PUBLIC: | 147 case user::LOGGED_IN_PUBLIC: |
| 148 need_avatar = true; | 148 need_avatar = true; |
| 149 break; | 149 break; |
| 150 case user::LOGGED_IN_SUPERVISED: | 150 case user::LOGGED_IN_SUPERVISED: |
| 151 need_avatar = true; | 151 need_avatar = true; |
| 152 need_label = true; | 152 need_label = true; |
| 153 break; | 153 break; |
| 154 case user::LOGGED_IN_GUEST: | 154 case user::LOGGED_IN_GUEST: |
| 155 need_label = true; | 155 need_label = true; |
| 156 break; | 156 break; |
| 157 case user::LOGGED_IN_RETAIL_MODE: | |
| 158 case user::LOGGED_IN_KIOSK_APP: | 157 case user::LOGGED_IN_KIOSK_APP: |
| 159 case user::LOGGED_IN_NONE: | 158 case user::LOGGED_IN_NONE: |
| 160 break; | 159 break; |
| 161 } | 160 } |
| 162 | 161 |
| 163 if ((need_avatar != (avatar_ != NULL)) || | 162 if ((need_avatar != (avatar_ != NULL)) || |
| 164 (need_label != (label_ != NULL))) { | 163 (need_label != (label_ != NULL))) { |
| 165 layout_view_->RemoveAllChildViews(true); | 164 layout_view_->RemoveAllChildViews(true); |
| 166 if (need_label) { | 165 if (need_label) { |
| 167 label_ = new views::Label; | 166 label_ = new views::Label; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 void TrayUser::UpdateLayoutOfItem() { | 293 void TrayUser::UpdateLayoutOfItem() { |
| 295 RootWindowController* controller = GetRootWindowController( | 294 RootWindowController* controller = GetRootWindowController( |
| 296 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); | 295 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); |
| 297 if (controller && controller->shelf()) { | 296 if (controller && controller->shelf()) { |
| 298 UpdateAfterShelfAlignmentChange( | 297 UpdateAfterShelfAlignmentChange( |
| 299 controller->GetShelfLayoutManager()->GetAlignment()); | 298 controller->GetShelfLayoutManager()->GetAlignment()); |
| 300 } | 299 } |
| 301 } | 300 } |
| 302 | 301 |
| 303 } // namespace ash | 302 } // namespace ash |
| OLD | NEW |