| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 5 #ifndef UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| 6 #define UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 6 #define UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class WindowTree; | 24 class WindowTree; |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace aura { | 28 namespace aura { |
| 29 | 29 |
| 30 class Window; | 30 class Window; |
| 31 class WindowTreeClient; | 31 class WindowTreeClient; |
| 32 class WindowTreeHostMus; | 32 class WindowTreeHostMus; |
| 33 | 33 |
| 34 struct WindowTreeHostMusInitParams; |
| 35 |
| 34 // Use to access implementation details of WindowTreeClient. | 36 // Use to access implementation details of WindowTreeClient. |
| 35 class WindowTreeClientPrivate { | 37 class WindowTreeClientPrivate { |
| 36 public: | 38 public: |
| 37 explicit WindowTreeClientPrivate(WindowTreeClient* tree_client_impl); | 39 explicit WindowTreeClientPrivate(WindowTreeClient* tree_client_impl); |
| 38 explicit WindowTreeClientPrivate(Window* window); | 40 explicit WindowTreeClientPrivate(Window* window); |
| 39 ~WindowTreeClientPrivate(); | 41 ~WindowTreeClientPrivate(); |
| 40 | 42 |
| 41 // Calls OnEmbed() on the WindowTreeClient. | 43 // Calls OnEmbed() on the WindowTreeClient. |
| 42 void OnEmbed(ui::mojom::WindowTree* window_tree); | 44 void OnEmbed(ui::mojom::WindowTree* window_tree); |
| 43 | 45 |
| 44 WindowTreeHostMus* CallWmNewDisplayAdded(const display::Display& display); | 46 WindowTreeHostMus* CallWmNewDisplayAdded(const display::Display& display); |
| 45 WindowTreeHostMus* CallWmNewDisplayAdded(const display::Display& display, | 47 WindowTreeHostMus* CallWmNewDisplayAdded(const display::Display& display, |
| 46 ui::mojom::WindowDataPtr root_data, | 48 ui::mojom::WindowDataPtr root_data, |
| 47 bool parent_drawn); | 49 bool parent_drawn); |
| 48 | 50 |
| 49 // Pretends that |event| has been received from the window server. | 51 // Pretends that |event| has been received from the window server. |
| 50 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); | 52 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); |
| 51 | 53 |
| 52 // Simulates |event| matching a pointer watcher on the window server. | 54 // Simulates |event| matching a pointer watcher on the window server. |
| 53 void CallOnPointerEventObserved(Window* window, | 55 void CallOnPointerEventObserved(Window* window, |
| 54 std::unique_ptr<ui::Event> event); | 56 std::unique_ptr<ui::Event> event); |
| 55 | 57 |
| 56 void CallOnCaptureChanged(Window* new_capture, Window* old_capture); | 58 void CallOnCaptureChanged(Window* new_capture, Window* old_capture); |
| 57 | 59 |
| 58 void CallOnConnect(); | 60 void CallOnConnect(); |
| 59 | 61 |
| 62 WindowTreeHostMusInitParams CallCreateInitParamsForNewDisplay(); |
| 63 |
| 60 // Sets the WindowTree and client id. | 64 // Sets the WindowTree and client id. |
| 61 void SetTreeAndClientId(ui::mojom::WindowTree* window_tree, | 65 void SetTreeAndClientId(ui::mojom::WindowTree* window_tree, |
| 62 ClientSpecificId client_id); | 66 ClientSpecificId client_id); |
| 63 | 67 |
| 64 bool HasPointerWatcher(); | 68 bool HasPointerWatcher(); |
| 65 | 69 |
| 66 Window* GetWindowByServerId(Id id); | 70 Window* GetWindowByServerId(Id id); |
| 67 | 71 |
| 68 private: | 72 private: |
| 69 WindowTreeClient* tree_client_impl_; | 73 WindowTreeClient* tree_client_impl_; |
| 70 uint16_t next_window_id_ = 1u; | 74 uint16_t next_window_id_ = 1u; |
| 71 | 75 |
| 72 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); | 76 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 } // namespace ui | 79 } // namespace ui |
| 76 | 80 |
| 77 #endif // UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 81 #endif // UI_AURA_TEST_MUS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| OLD | NEW |