| 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/common/wm/window_positioner.h" | 10 #include "ash/common/wm/window_positioner.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 void AshTestBase::SetSessionStarting() { | 320 void AshTestBase::SetSessionStarting() { |
| 321 AshTestHelper::GetTestSessionStateDelegate()->set_session_state( | 321 AshTestHelper::GetTestSessionStateDelegate()->set_session_state( |
| 322 SessionStateDelegate::SESSION_STATE_ACTIVE); | 322 SessionStateDelegate::SESSION_STATE_ACTIVE); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { | 325 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { |
| 326 AshTestHelper::GetTestSessionStateDelegate()->SetHasActiveUser( | 326 AshTestHelper::GetTestSessionStateDelegate()->SetHasActiveUser( |
| 327 user_logged_in); | 327 user_logged_in); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | |
| 331 AshTestHelper::GetTestSessionStateDelegate()->SetCanLockScreen( | |
| 332 can_lock_screen); | |
| 333 } | |
| 334 | |
| 335 void AshTestBase::SetShouldLockScreenBeforeSuspending(bool should_lock) { | 330 void AshTestBase::SetShouldLockScreenBeforeSuspending(bool should_lock) { |
| 336 AshTestHelper::GetTestSessionStateDelegate() | 331 AshTestHelper::GetTestSessionStateDelegate() |
| 337 ->SetShouldLockScreenBeforeSuspending(should_lock); | 332 ->SetShouldLockScreenBeforeSuspending(should_lock); |
| 338 } | 333 } |
| 339 | 334 |
| 340 void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) { | 335 void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) { |
| 341 AshTestHelper::GetTestSessionStateDelegate()->SetUserAddingScreenRunning( | 336 AshTestHelper::GetTestSessionStateDelegate()->SetUserAddingScreenRunning( |
| 342 user_adding_screen_running); | 337 user_adding_screen_running); |
| 343 } | 338 } |
| 344 | 339 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 397 |
| 403 void AshTestBase::SwapPrimaryDisplay() { | 398 void AshTestBase::SwapPrimaryDisplay() { |
| 404 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) | 399 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) |
| 405 return; | 400 return; |
| 406 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( | 401 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( |
| 407 display_manager()->GetSecondaryDisplay().id()); | 402 display_manager()->GetSecondaryDisplay().id()); |
| 408 } | 403 } |
| 409 | 404 |
| 410 } // namespace test | 405 } // namespace test |
| 411 } // namespace ash | 406 } // namespace ash |
| OLD | NEW |