| 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/test/test_session_state_delegate.h" | 5 #include "ash/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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 SessionStateDelegate::SessionState TestSessionStateDelegate::GetSessionState() | 159 SessionStateDelegate::SessionState TestSessionStateDelegate::GetSessionState() |
| 160 const { | 160 const { |
| 161 return session_state_; | 161 return session_state_; |
| 162 } | 162 } |
| 163 | 163 |
| 164 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { | 164 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { |
| 165 if (!has_active_user) { | 165 if (!has_active_user) { |
| 166 session_state_ = SESSION_STATE_LOGIN_PRIMARY; | 166 session_state_ = SESSION_STATE_LOGIN_PRIMARY; |
| 167 } else { | 167 } else { |
| 168 session_state_ = SESSION_STATE_ACTIVE; | 168 session_state_ = SESSION_STATE_ACTIVE; |
| 169 Shell::GetInstance()->ShowShelf(); | 169 WmShell::Get()->ShowShelf(); |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 void TestSessionStateDelegate::SetActiveUserSessionStarted( | 173 void TestSessionStateDelegate::SetActiveUserSessionStarted( |
| 174 bool active_user_session_started) { | 174 bool active_user_session_started) { |
| 175 if (active_user_session_started) { | 175 if (active_user_session_started) { |
| 176 user_manager_->SessionStarted(); | 176 user_manager_->SessionStarted(); |
| 177 session_state_ = SESSION_STATE_ACTIVE; | 177 session_state_ = SESSION_STATE_ACTIVE; |
| 178 Shell::GetInstance()->CreateShelf(); | 178 Shell::GetInstance()->CreateShelf(); |
| 179 Shell::GetInstance()->UpdateAfterLoginStatusChange(LoginStatus::USER); | 179 Shell::GetInstance()->UpdateAfterLoginStatusChange(LoginStatus::USER); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } | 248 } |
| 249 | 249 |
| 250 void TestSessionStateDelegate::AddSessionStateObserver( | 250 void TestSessionStateDelegate::AddSessionStateObserver( |
| 251 SessionStateObserver* observer) {} | 251 SessionStateObserver* observer) {} |
| 252 | 252 |
| 253 void TestSessionStateDelegate::RemoveSessionStateObserver( | 253 void TestSessionStateDelegate::RemoveSessionStateObserver( |
| 254 SessionStateObserver* observer) {} | 254 SessionStateObserver* observer) {} |
| 255 | 255 |
| 256 } // namespace test | 256 } // namespace test |
| 257 } // namespace ash | 257 } // namespace ash |
| OLD | NEW |