[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 | #ifndef ASH_SHELL_TEST_API_H_ |
6 | #define ASH_SHELL_TEST_API_H_ | ||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 7 | |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 8 | #include <memory> |
9 | |||||
avi | db567a8a | 2015-12-20 17:07:24 | [diff] [blame] | 10 | #include "base/macros.h" |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 11 | |
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame] | 12 | class PrefService; |
13 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 14 | namespace ash { |
[email protected] | c086bab | 2013-06-06 21:46:44 | [diff] [blame] | 15 | class DragDropController; |
James Cook | 459354b3 | 2017-09-27 23:18:01 | [diff] [blame^] | 16 | class MessageCenterController; |
17 | class NativeCursorManagerAsh; | ||||
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 18 | class PaletteDelegate; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 19 | class ScreenPositionController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 20 | class Shell; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 21 | class SystemGestureEventFilter; |
James Cook | 459354b3 | 2017-09-27 23:18:01 | [diff] [blame^] | 22 | class TabletModeWindowManager; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 23 | class WorkspaceController; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 24 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 25 | // Accesses private data from a Shell for testing. |
26 | class ShellTestApi { | ||||
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 27 | public: |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 28 | ShellTestApi(); |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 29 | explicit ShellTestApi(Shell* shell); |
30 | |||||
James Cook | 459354b3 | 2017-09-27 23:18:01 | [diff] [blame^] | 31 | MessageCenterController* message_center_controller(); |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 32 | SystemGestureEventFilter* system_gesture_event_filter(); |
33 | WorkspaceController* workspace_controller(); | ||||
34 | ScreenPositionController* screen_position_controller(); | ||||
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 35 | NativeCursorManagerAsh* native_cursor_manager_ash(); |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 36 | DragDropController* drag_drop_controller(); |
Mitsuru Oshima | 0e9b7a6 | 2017-07-19 18:23:03 | [diff] [blame] | 37 | TabletModeWindowManager* tablet_mode_window_manager(); |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 38 | |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 39 | void SetPaletteDelegate(std::unique_ptr<PaletteDelegate> palette_delegate); |
[email protected] | 7570bba | 2014-08-08 08:04:47 | [diff] [blame] | 40 | |
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame] | 41 | // Calls the private method. |
42 | void OnLocalStatePrefServiceInitialized( | ||||
43 | std::unique_ptr<PrefService> pref_service); | ||||
44 | |||||
Qiang Xu | 50c6f8c | 2017-08-31 20:55:24 | [diff] [blame] | 45 | // Resets |shell_->power_button_controller_| to hold a new object to simulate |
46 | // Chrome starting. | ||||
47 | void ResetPowerButtonControllerForTest(); | ||||
48 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 49 | private: |
50 | Shell* shell_; // not owned | ||||
51 | |||||
52 | DISALLOW_COPY_AND_ASSIGN(ShellTestApi); | ||||
53 | }; | ||||
54 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 55 | } // namespace ash |
56 | |||||
James Cook | 346c8c6 | 2017-07-18 19:38:37 | [diff] [blame] | 57 | #endif // ASH_SHELL_TEST_API_H_ |