[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; | ||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 18 | class ScreenPositionController; |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 19 | class Shell; |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 20 | class SystemGestureEventFilter; |
21 | class WorkspaceController; | ||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 22 | |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 23 | // Accesses private data from a Shell for testing. |
24 | class ShellTestApi { | ||||
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 25 | public: |
sky | 07a24d4 | 2017-03-09 23:57:30 | [diff] [blame] | 26 | ShellTestApi(); |
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 27 | explicit ShellTestApi(Shell* shell); |
28 | |||||
James Cook | 459354b3 | 2017-09-27 23:18:01 | [diff] [blame] | 29 | MessageCenterController* message_center_controller(); |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 30 | SystemGestureEventFilter* system_gesture_event_filter(); |
31 | WorkspaceController* workspace_controller(); | ||||
32 | ScreenPositionController* screen_position_controller(); | ||||
erg | 36cfb95 | 2017-06-21 19:41:45 | [diff] [blame] | 33 | NativeCursorManagerAsh* native_cursor_manager_ash(); |
[email protected] | 093b8d64 | 2014-04-03 20:59:28 | [diff] [blame] | 34 | DragDropController* drag_drop_controller(); |
[email protected] | 945ece96 | 2013-03-21 06:42:39 | [diff] [blame] | 35 | |
James Cook | bbe5cb1 | 2017-08-08 18:32:21 | [diff] [blame] | 36 | // Calls the private method. |
37 | void OnLocalStatePrefServiceInitialized( | ||||
38 | std::unique_ptr<PrefService> pref_service); | ||||
39 | |||||
Qiang Xu | 50c6f8c | 2017-08-31 20:55:24 | [diff] [blame] | 40 | // Resets |shell_->power_button_controller_| to hold a new object to simulate |
41 | // Chrome starting. | ||||
42 | void ResetPowerButtonControllerForTest(); | ||||
43 | |||||
James Cook | 7b7c6a5 | 2018-01-04 23:40:03 | [diff] [blame^] | 44 | // Simulates a modal dialog being open. |
45 | void SimulateModalWindowOpenForTest(bool modal_window_open); | ||||
46 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 47 | private: |
48 | Shell* shell_; // not owned | ||||
49 | |||||
50 | DISALLOW_COPY_AND_ASSIGN(ShellTestApi); | ||||
51 | }; | ||||
52 | |||||
[email protected] | 0c68e89 | 2012-12-08 16:54:53 | [diff] [blame] | 53 | } // namespace ash |
54 | |||||
James Cook | 346c8c6 | 2017-07-18 19:38:37 | [diff] [blame] | 55 | #endif // ASH_SHELL_TEST_API_H_ |