[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 | |||||
James Cook | 346c8c6 | 2017-07-18 19:38:37 | [diff] [blame] | 5 | #include "ash/shell_test_api.h" |
sky | 5ad143a | 2017-03-22 04:31:23 | [diff] [blame] | 6 | |
xiyuan | 317fdbe | 2017-05-31 15:02:02 | [diff] [blame] | 7 | #include <utility> |
8 | |||||
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 9 | #include "ash/palette_delegate.h" |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 10 | #include "ash/root_window_controller.h" |
11 | #include "ash/shell.h" | ||||
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame^] | 12 | #include "components/prefs/testing_pref_service.h" |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 13 | |
14 | namespace ash { | ||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 15 | |
sky | cb4be5b | 2017-04-06 17:52:45 | [diff] [blame] | 16 | ShellTestApi::ShellTestApi() : ShellTestApi(Shell::Get()) {} |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 17 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 18 | ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} |
19 | |||||
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 20 | SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 21 | return shell_->system_gesture_filter_.get(); |
22 | } | ||||
23 | |||||
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 24 | WorkspaceController* ShellTestApi::workspace_controller() { |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 25 | return shell_->GetPrimaryRootWindowController()->workspace_controller(); |
26 | } | ||||
27 | |||||
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 28 | ScreenPositionController* ShellTestApi::screen_position_controller() { |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 29 | return shell_->screen_position_controller_.get(); |
30 | } | ||||
31 | |||||
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 32 | NativeCursorManagerAsh* ShellTestApi::native_cursor_manager_ash() { |
[email protected] | c0ff034 | 2013-02-27 00:41:29 | [diff] [blame] | 33 | return shell_->native_cursor_manager_; |
34 | } | ||||
35 | |||||
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 36 | DragDropController* ShellTestApi::drag_drop_controller() { |
[email protected] | c086bab | 2013-06-06 21:46:44 | [diff] [blame] | 37 | return shell_->drag_drop_controller_.get(); |
38 | } | ||||
39 | |||||
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 40 | void ShellTestApi::SetPaletteDelegate( |
41 | std::unique_ptr<PaletteDelegate> palette_delegate) { | ||||
42 | shell_->palette_delegate_ = std::move(palette_delegate); | ||||
43 | } | ||||
44 | |||||
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame^] | 45 | void ShellTestApi::OnLocalStatePrefServiceInitialized( |
46 | std::unique_ptr<PrefService> pref_service) { | ||||
47 | shell_->OnLocalStatePrefServiceInitialized(std::move(pref_service)); | ||||
48 | } | ||||
49 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 50 | } // namespace ash |