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/screen_layout_observer.h" | 5 #include "ash/system/chromeos/screen_layout_observer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 case LoginStatus::NOT_LOGGED_IN: | 71 case LoginStatus::NOT_LOGGED_IN: |
72 case LoginStatus::LOCKED: | 72 case LoginStatus::LOCKED: |
73 return false; | 73 return false; |
74 | 74 |
75 case LoginStatus::USER: | 75 case LoginStatus::USER: |
76 case LoginStatus::OWNER: | 76 case LoginStatus::OWNER: |
77 case LoginStatus::GUEST: | 77 case LoginStatus::GUEST: |
78 case LoginStatus::PUBLIC: | 78 case LoginStatus::PUBLIC: |
79 case LoginStatus::SUPERVISED: | 79 case LoginStatus::SUPERVISED: |
80 case LoginStatus::KIOSK_APP: | 80 case LoginStatus::KIOSK_APP: |
81 case LoginStatus::ARC_KIOSK_APP: | |
81 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 82 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
82 if (delegate->ShouldShowSettings()) { | 83 if (delegate->ShouldShowSettings()) { |
83 WmShell::Get()->system_tray_controller()->ShowDisplaySettings(); | 84 WmShell::Get()->system_tray_controller()->ShowDisplaySettings(); |
84 return true; | 85 return true; |
85 } | 86 } |
86 } | 87 } |
James Cook
2016/10/18 15:33:17
nit: add "break" above, or "return false" and remo
| |
87 | 88 |
88 return false; | 89 return false; |
89 } | 90 } |
90 | 91 |
91 // Callback to handle a user selecting the notification view. | 92 // Callback to handle a user selecting the notification view. |
92 void OpenSettingsFromNotification() { | 93 void OpenSettingsFromNotification() { |
93 WmShell::Get()->RecordUserMetricsAction( | 94 WmShell::Get()->RecordUserMetricsAction( |
94 UMA_STATUS_AREA_DISPLAY_NOTIFICATION_SELECTED); | 95 UMA_STATUS_AREA_DISPLAY_NOTIFICATION_SELECTED); |
95 if (OpenSettings()) { | 96 if (OpenSettings()) { |
96 WmShell::Get()->RecordUserMetricsAction( | 97 WmShell::Get()->RecordUserMetricsAction( |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 if (!show_notifications_for_testing) | 304 if (!show_notifications_for_testing) |
304 return; | 305 return; |
305 | 306 |
306 base::string16 message; | 307 base::string16 message; |
307 base::string16 additional_message; | 308 base::string16 additional_message; |
308 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) | 309 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) |
309 CreateOrUpdateNotification(message, additional_message); | 310 CreateOrUpdateNotification(message, additional_message); |
310 } | 311 } |
311 | 312 |
312 } // namespace ash | 313 } // namespace ash |
OLD | NEW |