| 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/chromeos/tray_display.h" | 5 #include "ash/system/chromeos/tray_display.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 10 #include "ash/system/system_notifier.h" | 11 #include "ash/system/system_notifier.h" |
| 11 #include "ash/system/tray/actionable_view.h" | 12 #include "ash/system/tray/actionable_view.h" |
| 12 #include "ash/system/tray/fixed_sized_image_view.h" | 13 #include "ash/system/tray/fixed_sized_image_view.h" |
| 13 #include "ash/system/tray/system_tray.h" | 14 #include "ash/system/tray/system_tray.h" |
| 14 #include "ash/system/tray/system_tray_delegate.h" | 15 #include "ash/system/tray/system_tray_delegate.h" |
| 15 #include "ash/system/tray/tray_constants.h" | 16 #include "ash/system/tray/tray_constants.h" |
| 16 #include "ash/system/tray/tray_notification_view.h" | 17 #include "ash/system/tray/tray_notification_view.h" |
| 17 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 18 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 18 #include "base/bind.h" | 19 #include "base/bind.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 continue; | 104 continue; |
| 104 lines.push_back(GetDisplayInfoLine(id)); | 105 lines.push_back(GetDisplayInfoLine(id)); |
| 105 } | 106 } |
| 106 | 107 |
| 107 return JoinString(lines, '\n'); | 108 return JoinString(lines, '\n'); |
| 108 } | 109 } |
| 109 | 110 |
| 110 void OpenSettings() { | 111 void OpenSettings() { |
| 111 // switch is intentionally introduced without default, to cause an error when | 112 // switch is intentionally introduced without default, to cause an error when |
| 112 // a new type of login status is introduced. | 113 // a new type of login status is introduced. |
| 114 if (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() == |
| 115 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) |
| 116 return; |
| 117 |
| 113 switch (Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus()) { | 118 switch (Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus()) { |
| 114 case user::LOGGED_IN_NONE: | 119 case user::LOGGED_IN_NONE: |
| 115 case user::LOGGED_IN_LOCKED: | 120 case user::LOGGED_IN_LOCKED: |
| 116 return; | 121 return; |
| 117 | 122 |
| 118 case user::LOGGED_IN_USER: | 123 case user::LOGGED_IN_USER: |
| 119 case user::LOGGED_IN_OWNER: | 124 case user::LOGGED_IN_OWNER: |
| 120 case user::LOGGED_IN_GUEST: | 125 case user::LOGGED_IN_GUEST: |
| 121 case user::LOGGED_IN_RETAIL_MODE: | 126 case user::LOGGED_IN_RETAIL_MODE: |
| 122 case user::LOGGED_IN_PUBLIC: | 127 case user::LOGGED_IN_PUBLIC: |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 443 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
| 439 views::View* view = default_; | 444 views::View* view = default_; |
| 440 if (view) { | 445 if (view) { |
| 441 view->GetAccessibleState(state); | 446 view->GetAccessibleState(state); |
| 442 return true; | 447 return true; |
| 443 } | 448 } |
| 444 return false; | 449 return false; |
| 445 } | 450 } |
| 446 | 451 |
| 447 } // namespace ash | 452 } // namespace ash |
| OLD | NEW |