OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 TestSystemTrayDelegate* AshTestBase::GetSystemTrayDelegate() { | 285 TestSystemTrayDelegate* AshTestBase::GetSystemTrayDelegate() { |
286 return static_cast<TestSystemTrayDelegate*>( | 286 return static_cast<TestSystemTrayDelegate*>( |
287 Shell::GetInstance()->system_tray_delegate()); | 287 Shell::GetInstance()->system_tray_delegate()); |
288 } | 288 } |
289 | 289 |
290 void AshTestBase::SetSessionStarted(bool session_started) { | 290 void AshTestBase::SetSessionStarted(bool session_started) { |
291 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> | 291 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> |
292 SetActiveUserSessionStarted(session_started); | 292 SetActiveUserSessionStarted(session_started); |
293 } | 293 } |
294 | 294 |
| 295 void AshTestBase::SetSessionStarting() { |
| 296 ash_test_helper_->test_shell_delegate() |
| 297 ->test_session_state_delegate() |
| 298 ->set_session_state(SessionStateDelegate::SESSION_STATE_ACTIVE); |
| 299 } |
| 300 |
295 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { | 301 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { |
296 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> | 302 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> |
297 SetHasActiveUser(user_logged_in); | 303 SetHasActiveUser(user_logged_in); |
298 } | 304 } |
299 | 305 |
300 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 306 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
301 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> | 307 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> |
302 SetCanLockScreen(can_lock_screen); | 308 SetCanLockScreen(can_lock_screen); |
303 } | 309 } |
304 | 310 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 342 |
337 void AshTestBase::UnblockUserSession() { | 343 void AshTestBase::UnblockUserSession() { |
338 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 344 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
339 SetSessionStarted(true); | 345 SetSessionStarted(true); |
340 SetUserAddingScreenRunning(false); | 346 SetUserAddingScreenRunning(false); |
341 } | 347 } |
342 | 348 |
343 | 349 |
344 } // namespace test | 350 } // namespace test |
345 } // namespace ash | 351 } // namespace ash |
OLD | NEW |