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/test/test_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.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 session_manager::SessionState::ACTIVE); | 322 session_manager::SessionState::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::SetShouldLockScreenBeforeSuspending(bool should_lock) { | 330 void AshTestBase::SetShouldLockScreenAutomatically(bool should_lock) { |
331 AshTestHelper::GetTestSessionStateDelegate() | 331 AshTestHelper::GetTestSessionStateDelegate() |
332 ->SetShouldLockScreenBeforeSuspending(should_lock); | 332 ->SetShouldLockScreenAutomatically(should_lock); |
333 } | 333 } |
334 | 334 |
335 void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) { | 335 void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) { |
336 AshTestHelper::GetTestSessionStateDelegate()->SetUserAddingScreenRunning( | 336 AshTestHelper::GetTestSessionStateDelegate()->SetUserAddingScreenRunning( |
337 user_adding_screen_running); | 337 user_adding_screen_running); |
338 } | 338 } |
339 | 339 |
340 void AshTestBase::BlockUserSession(UserSessionBlockReason block_reason) { | 340 void AshTestBase::BlockUserSession(UserSessionBlockReason block_reason) { |
341 switch (block_reason) { | 341 switch (block_reason) { |
342 case BLOCKED_BY_LOCK_SCREEN: | 342 case BLOCKED_BY_LOCK_SCREEN: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 397 |
398 void AshTestBase::SwapPrimaryDisplay() { | 398 void AshTestBase::SwapPrimaryDisplay() { |
399 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) | 399 if (display::Screen::GetScreen()->GetNumDisplays() <= 1) |
400 return; | 400 return; |
401 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( | 401 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( |
402 display_manager()->GetSecondaryDisplay().id()); | 402 display_manager()->GetSecondaryDisplay().id()); |
403 } | 403 } |
404 | 404 |
405 } // namespace test | 405 } // namespace test |
406 } // namespace ash | 406 } // namespace ash |
OLD | NEW |