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/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 case user::LOGGED_IN_LOCKED: | 115 case user::LOGGED_IN_LOCKED: |
116 return; | 116 return; |
117 | 117 |
118 case user::LOGGED_IN_USER: | 118 case user::LOGGED_IN_USER: |
119 case user::LOGGED_IN_OWNER: | 119 case user::LOGGED_IN_OWNER: |
120 case user::LOGGED_IN_GUEST: | 120 case user::LOGGED_IN_GUEST: |
121 case user::LOGGED_IN_RETAIL_MODE: | 121 case user::LOGGED_IN_RETAIL_MODE: |
122 case user::LOGGED_IN_PUBLIC: | 122 case user::LOGGED_IN_PUBLIC: |
123 case user::LOGGED_IN_SUPERVISED: | 123 case user::LOGGED_IN_SUPERVISED: |
124 case user::LOGGED_IN_KIOSK_APP: | 124 case user::LOGGED_IN_KIOSK_APP: |
125 Shell::GetInstance()->system_tray_delegate()->ShowDisplaySettings(); | 125 ash::SystemTrayDelegate* delegate = |
| 126 Shell::GetInstance()->system_tray_delegate(); |
| 127 if (delegate->ShouldShowSettings()) |
| 128 delegate->ShowDisplaySettings(); |
126 } | 129 } |
127 } | 130 } |
128 | 131 |
129 } // namespace | 132 } // namespace |
130 | 133 |
131 const char TrayDisplay::kNotificationId[] = "chrome://settings/display"; | 134 const char TrayDisplay::kNotificationId[] = "chrome://settings/display"; |
132 | 135 |
133 class DisplayView : public ActionableView { | 136 class DisplayView : public ActionableView { |
134 public: | 137 public: |
135 explicit DisplayView() { | 138 explicit DisplayView() { |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 441 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
439 views::View* view = default_; | 442 views::View* view = default_; |
440 if (view) { | 443 if (view) { |
441 view->GetAccessibleState(state); | 444 view->GetAccessibleState(state); |
442 return true; | 445 return true; |
443 } | 446 } |
444 return false; | 447 return false; |
445 } | 448 } |
446 | 449 |
447 } // namespace ash | 450 } // namespace ash |
OLD | NEW |