| 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/session_controller_client.h" | 5 #include "chrome/browser/ui/ash/session_controller_client.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/public/cpp/session_types.h" | 10 #include "ash/public/cpp/session_types.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 SessionManager::Get()->RemoveObserver(this); | 111 SessionManager::Get()->RemoveObserver(this); |
| 112 UserManager::Get()->RemoveObserver(this); | 112 UserManager::Get()->RemoveObserver(this); |
| 113 UserManager::Get()->RemoveSessionStateObserver(this); | 113 UserManager::Get()->RemoveSessionStateObserver(this); |
| 114 } | 114 } |
| 115 | 115 |
| 116 // static | 116 // static |
| 117 SessionControllerClient* SessionControllerClient::Get() { | 117 SessionControllerClient* SessionControllerClient::Get() { |
| 118 return g_instance; | 118 return g_instance; |
| 119 } | 119 } |
| 120 | 120 |
| 121 void SessionControllerClient::StartLock(StartLockCallback callback) { |
| 122 session_controller_->StartLock(callback); |
| 123 } |
| 124 |
| 121 void SessionControllerClient::RunUnlockAnimation( | 125 void SessionControllerClient::RunUnlockAnimation( |
| 122 base::Closure animation_finished_callback) { | 126 base::Closure animation_finished_callback) { |
| 123 session_controller_->RunUnlockAnimation(animation_finished_callback); | 127 session_controller_->RunUnlockAnimation(animation_finished_callback); |
| 124 } | 128 } |
| 125 | 129 |
| 126 void SessionControllerClient::RequestLockScreen() { | 130 void SessionControllerClient::RequestLockScreen() { |
| 127 DoLockScreen(); | 131 DoLockScreen(); |
| 128 } | 132 } |
| 129 | 133 |
| 130 void SessionControllerClient::SwitchActiveUser(const AccountId& account_id) { | 134 void SessionControllerClient::SwitchActiveUser(const AccountId& account_id) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 const UserList logged_in_users = user_manager->GetLoggedInUsers(); | 324 const UserList logged_in_users = user_manager->GetLoggedInUsers(); |
| 321 std::vector<uint32_t> user_session_ids; | 325 std::vector<uint32_t> user_session_ids; |
| 322 for (auto* user : user_manager->GetLRULoggedInUsers()) { | 326 for (auto* user : user_manager->GetLRULoggedInUsers()) { |
| 323 const uint32_t user_session_id = GetSessionId(*user); | 327 const uint32_t user_session_id = GetSessionId(*user); |
| 324 DCHECK_NE(0u, user_session_id); | 328 DCHECK_NE(0u, user_session_id); |
| 325 user_session_ids.push_back(user_session_id); | 329 user_session_ids.push_back(user_session_id); |
| 326 } | 330 } |
| 327 | 331 |
| 328 session_controller_->SetUserSessionOrder(user_session_ids); | 332 session_controller_->SetUserSessionOrder(user_session_ids); |
| 329 } | 333 } |
| OLD | NEW |