| 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 "ash/session/session_controller.h" | 5 #include "ash/session/session_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/public/interfaces/user_info.mojom.h" | 10 #include "ash/public/interfaces/user_info.mojom.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 if (Shell::HasInstance()) | 273 if (Shell::HasInstance()) |
| 274 Shell::Get()->lock_state_controller()->OnLockScreenHide( | 274 Shell::Get()->lock_state_controller()->OnLockScreenHide( |
| 275 std::move(callback)); | 275 std::move(callback)); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void SessionController::NotifyChromeTerminating() { | 278 void SessionController::NotifyChromeTerminating() { |
| 279 for (auto& observer : observers_) | 279 for (auto& observer : observers_) |
| 280 observer.OnChromeTerminating(); | 280 observer.OnChromeTerminating(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void SessionController::SetSessionLengthLimit(base::TimeDelta length_limit, |
| 284 base::TimeTicks start_time) { |
| 285 session_length_limit_ = length_limit; |
| 286 session_start_time_ = start_time; |
| 287 for (auto& observer : observers_) |
| 288 observer.OnSessionLengthLimitChanged(); |
| 289 } |
| 290 |
| 283 void SessionController::ClearUserSessionsForTest() { | 291 void SessionController::ClearUserSessionsForTest() { |
| 284 user_sessions_.clear(); | 292 user_sessions_.clear(); |
| 285 } | 293 } |
| 286 | 294 |
| 287 void SessionController::FlushMojoForTest() { | 295 void SessionController::FlushMojoForTest() { |
| 288 client_.FlushForTesting(); | 296 client_.FlushForTesting(); |
| 289 } | 297 } |
| 290 | 298 |
| 291 void SessionController::LockScreenAndFlushForTest() { | 299 void SessionController::LockScreenAndFlushForTest() { |
| 292 LockScreen(); | 300 LockScreen(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 for (auto& observer : observers_) | 398 for (auto& observer : observers_) |
| 391 observer.OnLoginStatusChanged(login_status_); | 399 observer.OnLoginStatusChanged(login_status_); |
| 392 } | 400 } |
| 393 | 401 |
| 394 void SessionController::OnLockAnimationFinished() { | 402 void SessionController::OnLockAnimationFinished() { |
| 395 if (!start_lock_callback_.is_null()) | 403 if (!start_lock_callback_.is_null()) |
| 396 std::move(start_lock_callback_).Run(true /* locked */); | 404 std::move(start_lock_callback_).Run(true /* locked */); |
| 397 } | 405 } |
| 398 | 406 |
| 399 } // namespace ash | 407 } // namespace ash |
| OLD | NEW |