[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ash/test/shell_test_api.h" |
| 6 | |
| 7 | #include "ash/root_window_controller.h" |
| 8 | #include "ash/shell.h" |
| 9 | |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 10 | #if defined(OS_CHROMEOS) |
| 11 | #include "ash/display/output_configurator_animation.h" |
| 12 | #include "chromeos/display/output_configurator.h" |
| 13 | #endif |
| 14 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 15 | namespace ash { |
| 16 | namespace test { |
| 17 | |
| 18 | ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} |
| 19 | |
| 20 | internal::RootWindowLayoutManager* ShellTestApi::root_window_layout() { |
| 21 | return shell_->GetPrimaryRootWindowController()->root_window_layout(); |
| 22 | } |
| 23 | |
| 24 | views::corewm::InputMethodEventFilter* |
| 25 | ShellTestApi::input_method_event_filter() { |
| 26 | return shell_->input_method_filter_.get(); |
| 27 | } |
| 28 | |
| 29 | internal::SystemGestureEventFilter* |
| 30 | ShellTestApi::system_gesture_event_filter() { |
| 31 | return shell_->system_gesture_filter_.get(); |
| 32 | } |
| 33 | |
| 34 | internal::WorkspaceController* ShellTestApi::workspace_controller() { |
| 35 | return shell_->GetPrimaryRootWindowController()->workspace_controller(); |
| 36 | } |
| 37 | |
| 38 | internal::ScreenPositionController* |
| 39 | ShellTestApi::screen_position_controller() { |
| 40 | return shell_->screen_position_controller_.get(); |
| 41 | } |
| 42 | |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 43 | AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { |
| 44 | return shell_->native_cursor_manager_; |
| 45 | } |
| 46 | |
[email protected] | 0af5804 | 2012-12-13 03:21:35 | [diff] [blame] | 47 | LauncherModel* ShellTestApi::launcher_model() { |
| 48 | return shell_->launcher_model_.get(); |
| 49 | } |
| 50 | |
[email protected] | c086bab | 2013-06-06 21:46:44 | [diff] [blame^] | 51 | internal::DragDropController* ShellTestApi::drag_drop_controller() { |
| 52 | return shell_->drag_drop_controller_.get(); |
| 53 | } |
| 54 | |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 55 | void ShellTestApi::DisableOutputConfiguratorAnimation() { |
| 56 | #if defined(OS_CHROMEOS) |
[email protected] | 7f7f65c | 2013-04-17 16:47:13 | [diff] [blame] | 57 | if (shell_->output_configurator_animation_) { |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 58 | shell_->output_configurator_->RemoveObserver( |
| 59 | shell_->output_configurator_animation_.get()); |
| 60 | shell_->output_configurator_animation_.reset(); |
| 61 | } |
| 62 | #endif // defined(OS_CHROMEOS) |
| 63 | } |
| 64 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 65 | } // namespace test |
| 66 | } // namespace ash |