| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/system/chromeos/session/logout_confirmation_controller.h" | 5 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/login_status.h" | 9 #include "ash/common/login_status.h" |
| 10 #include "ash/common/system/chromeos/session/logout_confirmation_dialog.h" | 10 #include "ash/common/system/chromeos/session/logout_confirmation_dialog.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 logout_closure_.Run(); | 87 logout_closure_.Run(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void LogoutConfirmationController::OnDialogClosed() { | 90 void LogoutConfirmationController::OnDialogClosed() { |
| 91 logout_time_ = base::TimeTicks(); | 91 logout_time_ = base::TimeTicks(); |
| 92 dialog_ = NULL; | 92 dialog_ = NULL; |
| 93 logout_timer_.Stop(); | 93 logout_timer_.Stop(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void LogoutConfirmationController::OnLastWindowClosed() { | 96 void LogoutConfirmationController::OnLastWindowClosed() { |
| 97 if (WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() != | 97 if (Shell::Get()->system_tray_delegate()->GetUserLoginStatus() != |
| 98 LoginStatus::PUBLIC) { | 98 LoginStatus::PUBLIC) { |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 | 101 |
| 102 // Ask the user to confirm logout if a public session is in progress and the | 102 // Ask the user to confirm logout if a public session is in progress and the |
| 103 // screen is not locked. | 103 // screen is not locked. |
| 104 ConfirmLogout( | 104 ConfirmLogout( |
| 105 base::TimeTicks::Now() + | 105 base::TimeTicks::Now() + |
| 106 base::TimeDelta::FromSeconds(kLogoutConfirmationDelayInSeconds)); | 106 base::TimeDelta::FromSeconds(kLogoutConfirmationDelayInSeconds)); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace ash | 109 } // namespace ash |
| OLD | NEW |