| 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/display/display_configuration_controller.h" | 7 #include "ash/display/display_configuration_controller.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
| 10 #include "ash/shelf/shelf_delegate.h" | 10 #include "ash/shelf/shelf_delegate.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ash/shell_delegate.h" | |
| 13 | 12 |
| 14 namespace ash { | 13 namespace ash { |
| 15 namespace test { | 14 namespace test { |
| 16 | 15 |
| 17 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} | 16 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} |
| 18 | 17 |
| 19 RootWindowLayoutManager* ShellTestApi::root_window_layout() { | 18 RootWindowLayoutManager* ShellTestApi::root_window_layout() { |
| 20 return shell_->GetPrimaryRootWindowController()->root_window_layout(); | 19 return shell_->GetPrimaryRootWindowController()->root_window_layout(); |
| 21 } | 20 } |
| 22 | 21 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 37 } | 36 } |
| 38 | 37 |
| 39 ShelfModel* ShellTestApi::shelf_model() { | 38 ShelfModel* ShellTestApi::shelf_model() { |
| 40 return shell_->shelf_model_.get(); | 39 return shell_->shelf_model_.get(); |
| 41 } | 40 } |
| 42 | 41 |
| 43 DragDropController* ShellTestApi::drag_drop_controller() { | 42 DragDropController* ShellTestApi::drag_drop_controller() { |
| 44 return shell_->drag_drop_controller_.get(); | 43 return shell_->drag_drop_controller_.get(); |
| 45 } | 44 } |
| 46 | 45 |
| 47 app_list::AppListShower* ShellTestApi::app_list_shower() { | 46 AppListController* ShellTestApi::app_list_controller() { |
| 48 return shell_->delegate_->GetAppListShower(); | 47 return shell_->app_list_controller_.get(); |
| 49 } | 48 } |
| 50 | 49 |
| 51 void ShellTestApi::DisableDisplayAnimator() { | 50 void ShellTestApi::DisableDisplayAnimator() { |
| 52 shell_->display_configuration_controller()->ResetAnimatorForTest(); | 51 shell_->display_configuration_controller()->ResetAnimatorForTest(); |
| 53 } | 52 } |
| 54 | 53 |
| 55 void ShellTestApi::SetShelfDelegate(ShelfDelegate* delegate) { | 54 void ShellTestApi::SetShelfDelegate(ShelfDelegate* delegate) { |
| 56 shell_->shelf_delegate_.reset(delegate); | 55 shell_->shelf_delegate_.reset(delegate); |
| 57 } | 56 } |
| 58 | 57 |
| 59 void ShellTestApi::SetSessionStateDelegate( | 58 void ShellTestApi::SetSessionStateDelegate( |
| 60 SessionStateDelegate* session_state_delegate) { | 59 SessionStateDelegate* session_state_delegate) { |
| 61 shell_->session_state_delegate_.reset(session_state_delegate); | 60 shell_->session_state_delegate_.reset(session_state_delegate); |
| 62 } | 61 } |
| 63 | 62 |
| 64 } // namespace test | 63 } // namespace test |
| 65 } // namespace ash | 64 } // namespace ash |
| OLD | NEW |