blob: 0465cbf2f42abd815dd844421b1a7d21f3dd8f5f [file] [log] [blame]
[email protected]0c68e892012-12-08 16:54:531// 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 Cook346c8c62017-07-18 19:38:375#ifndef ASH_SHELL_TEST_API_H_
6#define ASH_SHELL_TEST_API_H_
[email protected]0c68e892012-12-08 16:54:537
sky07a24d42017-03-09 23:57:308#include <memory>
9
avidb567a8a2015-12-20 17:07:2410#include "base/macros.h"
[email protected]0c68e892012-12-08 16:54:5311
James Cookbbe5cb12017-08-08 18:32:2112class PrefService;
13
[email protected]0c68e892012-12-08 16:54:5314namespace ash {
[email protected]c086bab2013-06-06 21:46:4415class DragDropController;
James Cook459354b32017-09-27 23:18:0116class MessageCenterController;
17class NativeCursorManagerAsh;
[email protected]0c68e892012-12-08 16:54:5318class ScreenPositionController;
[email protected]093b8d642014-04-03 20:59:2819class Shell;
[email protected]0c68e892012-12-08 16:54:5320class SystemGestureEventFilter;
21class WorkspaceController;
[email protected]0c68e892012-12-08 16:54:5322
[email protected]0c68e892012-12-08 16:54:5323// Accesses private data from a Shell for testing.
24class ShellTestApi {
jamescookb8dcef522016-06-25 14:42:5525 public:
sky07a24d42017-03-09 23:57:3026 ShellTestApi();
[email protected]0c68e892012-12-08 16:54:5327 explicit ShellTestApi(Shell* shell);
28
James Cook459354b32017-09-27 23:18:0129 MessageCenterController* message_center_controller();
[email protected]093b8d642014-04-03 20:59:2830 SystemGestureEventFilter* system_gesture_event_filter();
31 WorkspaceController* workspace_controller();
32 ScreenPositionController* screen_position_controller();
erg36cfb952017-06-21 19:41:4533 NativeCursorManagerAsh* native_cursor_manager_ash();
[email protected]093b8d642014-04-03 20:59:2834 DragDropController* drag_drop_controller();
[email protected]945ece962013-03-21 06:42:3935
James Cookbbe5cb12017-08-08 18:32:2136 // Calls the private method.
37 void OnLocalStatePrefServiceInitialized(
38 std::unique_ptr<PrefService> pref_service);
39
Qiang Xu50c6f8c2017-08-31 20:55:2440 // Resets |shell_->power_button_controller_| to hold a new object to simulate
41 // Chrome starting.
42 void ResetPowerButtonControllerForTest();
43
James Cook7b7c6a52018-01-04 23:40:0344 // Simulates a modal dialog being open.
45 void SimulateModalWindowOpenForTest(bool modal_window_open);
46
[email protected]0c68e892012-12-08 16:54:5347 private:
48 Shell* shell_; // not owned
49
50 DISALLOW_COPY_AND_ASSIGN(ShellTestApi);
51};
52
[email protected]0c68e892012-12-08 16:54:5353} // namespace ash
54
James Cook346c8c62017-07-18 19:38:3755#endif // ASH_SHELL_TEST_API_H_