OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void OnWmNewDisplay(Window* window, const display::Display& display) override; | 84 void OnWmNewDisplay(Window* window, const display::Display& display) override; |
85 void OnWmPerformMoveLoop(Window* window, | 85 void OnWmPerformMoveLoop(Window* window, |
86 mojom::MoveLoopSource source, | 86 mojom::MoveLoopSource source, |
87 const gfx::Point& cursor_location, | 87 const gfx::Point& cursor_location, |
88 const base::Callback<void(bool)>& on_done) override; | 88 const base::Callback<void(bool)>& on_done) override; |
89 void OnWmCancelMoveLoop(Window* window) override; | 89 void OnWmCancelMoveLoop(Window* window) override; |
90 mojom::EventResult OnAccelerator(uint32_t accelerator_id, | 90 mojom::EventResult OnAccelerator(uint32_t accelerator_id, |
91 const ui::Event& event) override; | 91 const ui::Event& event) override; |
92 | 92 |
93 // InterfaceFactory<WindowTreeClient>: | 93 // InterfaceFactory<WindowTreeClient>: |
94 void Create(shell::Connection* connection, | 94 void Create(const shell::Identity& remote_identity, |
95 mojo::InterfaceRequest<mojom::WindowTreeClient> request) override; | 95 mojo::InterfaceRequest<mojom::WindowTreeClient> request) override; |
96 | 96 |
97 // Used to receive the most recent window tree client loaded by an embed | 97 // Used to receive the most recent window tree client loaded by an embed |
98 // action. | 98 // action. |
99 WindowTreeClient* most_recent_client_; | 99 WindowTreeClient* most_recent_client_; |
100 | 100 |
101 private: | 101 private: |
102 mojom::WindowTreeHostPtr host_; | 102 mojom::WindowTreeHostPtr host_; |
103 | 103 |
104 // The window server connection held by the window manager (app running at | 104 // The window server connection held by the window manager (app running at |
105 // the root window). | 105 // the root window). |
106 WindowTreeClient* window_manager_; | 106 WindowTreeClient* window_manager_; |
107 | 107 |
108 // A test can override the WM-related behaviour by installing its own | 108 // A test can override the WM-related behaviour by installing its own |
109 // WindowManagerDelegate during the test. | 109 // WindowManagerDelegate during the test. |
110 WindowManagerDelegate* window_manager_delegate_; | 110 WindowManagerDelegate* window_manager_delegate_; |
111 | 111 |
112 WindowManagerClient* window_manager_client_; | 112 WindowManagerClient* window_manager_client_; |
113 | 113 |
114 bool window_tree_client_destroyed_; | 114 bool window_tree_client_destroyed_; |
115 | 115 |
116 DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); | 116 DISALLOW_COPY_AND_ASSIGN(WindowServerTestBase); |
117 }; | 117 }; |
118 | 118 |
119 } // namespace ui | 119 } // namespace ui |
120 | 120 |
121 #endif // SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ | 121 #endif // SERVICES_UI_PUBLIC_CPP_TESTS_WINDOW_SERVER_TEST_BASE_H_ |
OLD | NEW |