| 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/shell_test_api.h" | 5 #include "ash/test/shell_test_api.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/display/display_configuration_controller.h" | |
| 9 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 11 | 10 |
| 12 namespace ash { | 11 namespace ash { |
| 13 namespace test { | 12 namespace test { |
| 14 | 13 |
| 15 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} | 14 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} |
| 16 | 15 |
| 17 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { | 16 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { |
| 18 return shell_->system_gesture_filter_.get(); | 17 return shell_->system_gesture_filter_.get(); |
| 19 } | 18 } |
| 20 | 19 |
| 21 WorkspaceController* ShellTestApi::workspace_controller() { | 20 WorkspaceController* ShellTestApi::workspace_controller() { |
| 22 return shell_->GetPrimaryRootWindowController()->workspace_controller(); | 21 return shell_->GetPrimaryRootWindowController()->workspace_controller(); |
| 23 } | 22 } |
| 24 | 23 |
| 25 ScreenPositionController* ShellTestApi::screen_position_controller() { | 24 ScreenPositionController* ShellTestApi::screen_position_controller() { |
| 26 return shell_->screen_position_controller_.get(); | 25 return shell_->screen_position_controller_.get(); |
| 27 } | 26 } |
| 28 | 27 |
| 29 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { | 28 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { |
| 30 return shell_->native_cursor_manager_; | 29 return shell_->native_cursor_manager_; |
| 31 } | 30 } |
| 32 | 31 |
| 33 DragDropController* ShellTestApi::drag_drop_controller() { | 32 DragDropController* ShellTestApi::drag_drop_controller() { |
| 34 return shell_->drag_drop_controller_.get(); | 33 return shell_->drag_drop_controller_.get(); |
| 35 } | 34 } |
| 36 | 35 |
| 37 void ShellTestApi::DisableDisplayAnimator() { | |
| 38 shell_->display_configuration_controller()->ResetAnimatorForTest(); | |
| 39 } | |
| 40 | |
| 41 void ShellTestApi::SetSessionStateDelegate( | 36 void ShellTestApi::SetSessionStateDelegate( |
| 42 SessionStateDelegate* session_state_delegate) { | 37 SessionStateDelegate* session_state_delegate) { |
| 43 shell_->session_state_delegate_.reset(session_state_delegate); | 38 shell_->session_state_delegate_.reset(session_state_delegate); |
| 44 } | 39 } |
| 45 | 40 |
| 46 } // namespace test | 41 } // namespace test |
| 47 } // namespace ash | 42 } // namespace ash |
| OLD | NEW |