OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/ash/system_tray_client.h" | 5 #include "chrome/browser/ui/ash/system_tray_client.h" |
6 | 6 |
7 #include "ash/common/login_status.h" | 7 #include "ash/common/login_status.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 // User is not logged in. | 308 // User is not logged in. |
309 CHECK(!login_state->IsUserLoggedIn() || | 309 CHECK(!login_state->IsUserLoggedIn() || |
310 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); | 310 login_state->GetLoggedInUserType() == LoginState::LOGGED_IN_USER_NONE); |
311 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); | 311 chromeos::LoginDisplayHost::default_host()->OpenProxySettings(); |
312 } | 312 } |
313 | 313 |
314 void SystemTrayClient::SignOut() { | 314 void SystemTrayClient::SignOut() { |
315 chrome::AttemptUserExit(); | 315 chrome::AttemptUserExit(); |
316 } | 316 } |
317 | 317 |
318 void SystemTrayClient::RequestRestartForUpdate() { | 318 void SystemTrayClient::RequestRestartForUpdate(bool always_reboot) { |
319 // We expect that UpdateEngine is in "Reboot for update" state now. | 319 // We expect that UpdateEngine is in "Reboot for update" state now. |
320 chrome::NotifyAndTerminate(true /* fast_path */); | 320 chrome::NotifyAndTerminate(true /* fast_path */, always_reboot); |
James Cook
2016/11/30 23:01:41
For example, this could query SystemTrayDelegateCh
| |
321 } | 321 } |
322 | 322 |
323 //////////////////////////////////////////////////////////////////////////////// | 323 //////////////////////////////////////////////////////////////////////////////// |
324 // chromeos::system::SystemClockObserver: | 324 // chromeos::system::SystemClockObserver: |
325 | 325 |
326 void SystemTrayClient::OnSystemClockChanged( | 326 void SystemTrayClient::OnSystemClockChanged( |
327 chromeos::system::SystemClock* clock) { | 327 chromeos::system::SystemClock* clock) { |
328 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); | 328 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); |
329 } | 329 } |
OLD | NEW |