OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 | |
5 #ifndef SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | |
6 #define SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <memory> | |
11 | |
12 #include "base/macros.h" | |
13 #include "services/ui/common/types.h" | |
14 | |
15 namespace display { | |
16 class Display; | |
17 } | |
18 | |
19 namespace ui { | |
20 class Event; | |
21 } | |
22 | |
23 namespace ui { | |
24 namespace mojom { | |
25 class WindowTree; | |
26 } | |
27 | |
28 class Window; | |
29 class WindowTreeClient; | |
30 | |
31 // Use to access implementation details of WindowTreeClient. | |
32 class WindowTreeClientPrivate { | |
33 public: | |
34 explicit WindowTreeClientPrivate(WindowTreeClient* tree_client_impl); | |
35 explicit WindowTreeClientPrivate(Window* window); | |
36 ~WindowTreeClientPrivate(); | |
37 | |
38 // Calls OnEmbed() on the WindowTreeClient. | |
39 void OnEmbed(mojom::WindowTree* window_tree); | |
40 | |
41 void CallWmNewDisplayAdded(const display::Display& display); | |
42 | |
43 // Pretends that |event| has been received from the window server. | |
44 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); | |
45 | |
46 void CallOnCaptureChanged(Window* new_capture, Window* old_capture); | |
47 | |
48 // Sets the WindowTree and client id. | |
49 void SetTreeAndClientId(mojom::WindowTree* window_tree, | |
50 ClientSpecificId client_id); | |
51 | |
52 bool HasPointerWatcher(); | |
53 | |
54 private: | |
55 WindowTreeClient* tree_client_impl_; | |
56 uint16_t next_window_id_ = 1u; | |
57 | |
58 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); | |
59 }; | |
60 | |
61 } // namespace ui | |
62 | |
63 #endif // SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | |
OLD | NEW |