blob: b921535d38ac2ac571db7116af517f57c6149e00 [file] [log] [blame]
[email protected]0c68e892012-12-08 16:54:531// 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]945ece962013-03-21 06:42:3910#if defined(OS_CHROMEOS)
11#include "ash/display/output_configurator_animation.h"
12#include "chromeos/display/output_configurator.h"
13#endif
14
[email protected]0c68e892012-12-08 16:54:5315namespace ash {
16namespace test {
17
18ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {}
19
20internal::RootWindowLayoutManager* ShellTestApi::root_window_layout() {
21 return shell_->GetPrimaryRootWindowController()->root_window_layout();
22}
23
24views::corewm::InputMethodEventFilter*
25ShellTestApi::input_method_event_filter() {
26 return shell_->input_method_filter_.get();
27}
28
29internal::SystemGestureEventFilter*
30ShellTestApi::system_gesture_event_filter() {
31 return shell_->system_gesture_filter_.get();
32}
33
34internal::WorkspaceController* ShellTestApi::workspace_controller() {
35 return shell_->GetPrimaryRootWindowController()->workspace_controller();
36}
37
38internal::ScreenPositionController*
39ShellTestApi::screen_position_controller() {
40 return shell_->screen_position_controller_.get();
41}
42
[email protected]c0ff0342013-02-27 00:41:2943AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() {
44 return shell_->native_cursor_manager_;
45}
46
[email protected]0af58042012-12-13 03:21:3547LauncherModel* ShellTestApi::launcher_model() {
48 return shell_->launcher_model_.get();
49}
50
[email protected]c086bab2013-06-06 21:46:4451internal::DragDropController* ShellTestApi::drag_drop_controller() {
52 return shell_->drag_drop_controller_.get();
53}
54
[email protected]945ece962013-03-21 06:42:3955void ShellTestApi::DisableOutputConfiguratorAnimation() {
56#if defined(OS_CHROMEOS)
[email protected]7f7f65c2013-04-17 16:47:1357 if (shell_->output_configurator_animation_) {
[email protected]945ece962013-03-21 06:42:3958 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]0c68e892012-12-08 16:54:5365} // namespace test
66} // namespace ash