| 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/aura/wm_shell_aura.h" | |
| 8 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/shell_delegate.h" | |
| 10 #include "ash/display/display_configuration_controller.h" | 8 #include "ash/display/display_configuration_controller.h" |
| 11 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 12 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 13 | 11 |
| 14 namespace ash { | 12 namespace ash { |
| 15 namespace test { | 13 namespace test { |
| 16 | 14 |
| 17 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} | 15 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} |
| 18 | 16 |
| 19 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { | 17 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { |
| 20 return shell_->system_gesture_filter_.get(); | 18 return shell_->system_gesture_filter_.get(); |
| 21 } | 19 } |
| 22 | 20 |
| 23 WorkspaceController* ShellTestApi::workspace_controller() { | 21 WorkspaceController* ShellTestApi::workspace_controller() { |
| 24 return shell_->GetPrimaryRootWindowController()->workspace_controller(); | 22 return shell_->GetPrimaryRootWindowController()->workspace_controller(); |
| 25 } | 23 } |
| 26 | 24 |
| 27 ScreenPositionController* ShellTestApi::screen_position_controller() { | 25 ScreenPositionController* ShellTestApi::screen_position_controller() { |
| 28 return shell_->screen_position_controller_.get(); | 26 return shell_->screen_position_controller_.get(); |
| 29 } | 27 } |
| 30 | 28 |
| 31 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { | 29 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { |
| 32 return shell_->native_cursor_manager_; | 30 return shell_->native_cursor_manager_; |
| 33 } | 31 } |
| 34 | 32 |
| 35 ShelfModel* ShellTestApi::shelf_model() { | |
| 36 // TODO(jamescook): Remove this and access WmShell::shelf_model() directly. | |
| 37 return shell_->wm_shell_->shelf_model(); | |
| 38 } | |
| 39 | |
| 40 DragDropController* ShellTestApi::drag_drop_controller() { | 33 DragDropController* ShellTestApi::drag_drop_controller() { |
| 41 return shell_->drag_drop_controller_.get(); | 34 return shell_->drag_drop_controller_.get(); |
| 42 } | 35 } |
| 43 | 36 |
| 44 app_list::AppListPresenter* ShellTestApi::app_list_presenter() { | |
| 45 return shell_->wm_shell_->delegate()->GetAppListPresenter(); | |
| 46 } | |
| 47 | |
| 48 void ShellTestApi::DisableDisplayAnimator() { | 37 void ShellTestApi::DisableDisplayAnimator() { |
| 49 shell_->display_configuration_controller()->ResetAnimatorForTest(); | 38 shell_->display_configuration_controller()->ResetAnimatorForTest(); |
| 50 } | 39 } |
| 51 | 40 |
| 52 void ShellTestApi::SetSessionStateDelegate( | 41 void ShellTestApi::SetSessionStateDelegate( |
| 53 SessionStateDelegate* session_state_delegate) { | 42 SessionStateDelegate* session_state_delegate) { |
| 54 shell_->session_state_delegate_.reset(session_state_delegate); | 43 shell_->session_state_delegate_.reset(session_state_delegate); |
| 55 } | 44 } |
| 56 | 45 |
| 57 } // namespace test | 46 } // namespace test |
| 58 } // namespace ash | 47 } // namespace ash |
| OLD | NEW |