| 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" |
| 11 #include "ash/common/wm/window_positioner.h" | 11 #include "ash/common/wm/window_positioner.h" |
| 12 #include "ash/common/wm_shell.h" |
| 12 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
| 13 #include "ash/ime/input_method_event_handler.h" | 14 #include "ash/ime/input_method_event_handler.h" |
| 14 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 15 #include "ash/shell/toplevel_window.h" | 16 #include "ash/shell/toplevel_window.h" |
| 16 #include "ash/test/ash_test_helper.h" | 17 #include "ash/test/ash_test_helper.h" |
| 17 #include "ash/test/display_manager_test_api.h" | 18 #include "ash/test/display_manager_test_api.h" |
| 18 #include "ash/test/test_session_state_delegate.h" | 19 #include "ash/test/test_session_state_delegate.h" |
| 19 #include "ash/test/test_shell_delegate.h" | 20 #include "ash/test/test_shell_delegate.h" |
| 20 #include "ash/test/test_system_tray_delegate.h" | 21 #include "ash/test/test_system_tray_delegate.h" |
| 21 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void AshTestBase::RunAllPendingInMessageLoop() { | 267 void AshTestBase::RunAllPendingInMessageLoop() { |
| 267 ash_test_helper_->RunAllPendingInMessageLoop(); | 268 ash_test_helper_->RunAllPendingInMessageLoop(); |
| 268 } | 269 } |
| 269 | 270 |
| 270 TestScreenshotDelegate* AshTestBase::GetScreenshotDelegate() { | 271 TestScreenshotDelegate* AshTestBase::GetScreenshotDelegate() { |
| 271 return ash_test_helper_->test_screenshot_delegate(); | 272 return ash_test_helper_->test_screenshot_delegate(); |
| 272 } | 273 } |
| 273 | 274 |
| 274 TestSystemTrayDelegate* AshTestBase::GetSystemTrayDelegate() { | 275 TestSystemTrayDelegate* AshTestBase::GetSystemTrayDelegate() { |
| 275 return static_cast<TestSystemTrayDelegate*>( | 276 return static_cast<TestSystemTrayDelegate*>( |
| 276 Shell::GetInstance()->system_tray_delegate()); | 277 WmShell::Get()->system_tray_delegate()); |
| 277 } | 278 } |
| 278 | 279 |
| 279 void AshTestBase::SetSessionStarted(bool session_started) { | 280 void AshTestBase::SetSessionStarted(bool session_started) { |
| 280 AshTestHelper::GetTestSessionStateDelegate()->SetActiveUserSessionStarted( | 281 AshTestHelper::GetTestSessionStateDelegate()->SetActiveUserSessionStarted( |
| 281 session_started); | 282 session_started); |
| 282 } | 283 } |
| 283 | 284 |
| 284 void AshTestBase::SetSessionStarting() { | 285 void AshTestBase::SetSessionStarting() { |
| 285 AshTestHelper::GetTestSessionStateDelegate()->set_session_state( | 286 AshTestHelper::GetTestSessionStateDelegate()->set_session_state( |
| 286 SessionStateDelegate::SESSION_STATE_ACTIVE); | 287 SessionStateDelegate::SESSION_STATE_ACTIVE); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 337 |
| 337 void AshTestBase::DisableIME() { | 338 void AshTestBase::DisableIME() { |
| 338 Shell::GetInstance()->RemovePreTargetHandler( | 339 Shell::GetInstance()->RemovePreTargetHandler( |
| 339 Shell::GetInstance() | 340 Shell::GetInstance() |
| 340 ->window_tree_host_manager() | 341 ->window_tree_host_manager() |
| 341 ->input_method_event_handler()); | 342 ->input_method_event_handler()); |
| 342 } | 343 } |
| 343 | 344 |
| 344 } // namespace test | 345 } // namespace test |
| 345 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |