Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test/test_session_state_delegate.h" | 5 #include "ash/common/test/test_session_state_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/common/login_status.h" | 10 #include "ash/common/login_status.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 user_adding_screen_running_ || | 154 user_adding_screen_running_ || |
| 155 session_state_ != session_manager::SessionState::ACTIVE; | 155 session_state_ != session_manager::SessionState::ACTIVE; |
| 156 } | 156 } |
| 157 | 157 |
| 158 session_manager::SessionState TestSessionStateDelegate::GetSessionState() | 158 session_manager::SessionState TestSessionStateDelegate::GetSessionState() |
| 159 const { | 159 const { |
| 160 return session_state_; | 160 return session_state_; |
| 161 } | 161 } |
| 162 | 162 |
| 163 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { | 163 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { |
| 164 if (!has_active_user) { | 164 if (!has_active_user) { |
|
msw
2016/12/16 16:26:20
optional nit: remove curlies or change this to a t
James Cook
2016/12/20 04:02:42
Done.
| |
| 165 session_state_ = session_manager::SessionState::LOGIN_PRIMARY; | 165 session_state_ = session_manager::SessionState::LOGIN_PRIMARY; |
| 166 } else { | 166 } else { |
| 167 session_state_ = session_manager::SessionState::ACTIVE; | 167 session_state_ = session_manager::SessionState::ACTIVE; |
| 168 WmShell::Get()->ShowShelf(); | |
| 169 } | 168 } |
| 170 } | 169 } |
| 171 | 170 |
| 172 void TestSessionStateDelegate::SetActiveUserSessionStarted( | 171 void TestSessionStateDelegate::SetActiveUserSessionStarted( |
| 173 bool active_user_session_started) { | 172 bool active_user_session_started) { |
| 174 if (active_user_session_started) { | 173 if (active_user_session_started) { |
| 175 user_manager_->SessionStarted(); | 174 user_manager_->SessionStarted(); |
| 176 session_state_ = session_manager::SessionState::ACTIVE; | 175 session_state_ = session_manager::SessionState::ACTIVE; |
| 177 WmShell::Get()->CreateShelf(); | 176 WmShell::Get()->CreateShelf(); |
| 178 WmShell::Get()->UpdateAfterLoginStatusChange(LoginStatus::USER); | 177 WmShell::Get()->UpdateAfterLoginStatusChange(LoginStatus::USER); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 } | 246 } |
| 248 | 247 |
| 249 void TestSessionStateDelegate::AddSessionStateObserver( | 248 void TestSessionStateDelegate::AddSessionStateObserver( |
| 250 SessionStateObserver* observer) {} | 249 SessionStateObserver* observer) {} |
| 251 | 250 |
| 252 void TestSessionStateDelegate::RemoveSessionStateObserver( | 251 void TestSessionStateDelegate::RemoveSessionStateObserver( |
| 253 SessionStateObserver* observer) {} | 252 SessionStateObserver* observer) {} |
| 254 | 253 |
| 255 } // namespace test | 254 } // namespace test |
| 256 } // namespace ash | 255 } // namespace ash |
| OLD | NEW |