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 COMPONENTS_MUS_WS_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ |
6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ | 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
230 bool on_accelerator_called() { return on_accelerator_called_; } | 230 bool on_accelerator_called() { return on_accelerator_called_; } |
231 uint32_t on_accelerator_id() { return on_accelerator_id_; } | 231 uint32_t on_accelerator_id() { return on_accelerator_id_; } |
232 | 232 |
233 private: | 233 private: |
234 // WindowManager: | 234 // WindowManager: |
235 void WmSetBounds(uint32_t change_id, | 235 void WmSetBounds(uint32_t change_id, |
236 uint32_t window_id, | 236 uint32_t window_id, |
237 mojo::RectPtr bounds) override {} | 237 const gfx::Rect& bounds) override {} |
238 void WmSetProperty(uint32_t change_id, | 238 void WmSetProperty(uint32_t change_id, |
239 uint32_t window_id, | 239 uint32_t window_id, |
240 const mojo::String& name, | 240 const mojo::String& name, |
241 mojo::Array<uint8_t> value) override {} | 241 mojo::Array<uint8_t> value) override {} |
242 void WmCreateTopLevelWindow( | 242 void WmCreateTopLevelWindow( |
243 uint32_t change_id, | 243 uint32_t change_id, |
244 ConnectionSpecificId requesting_client_id, | 244 ConnectionSpecificId requesting_client_id, |
245 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; | 245 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; |
246 void WmClientJankinessChanged(ConnectionSpecificId client_id, | 246 void WmClientJankinessChanged(ConnectionSpecificId client_id, |
247 bool janky) override; | 247 bool janky) override; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 mus::mojom::WindowTreePtr tree, | 279 mus::mojom::WindowTreePtr tree, |
280 Id focused_window_id, | 280 Id focused_window_id, |
281 bool drawn) override; | 281 bool drawn) override; |
282 void OnEmbeddedAppDisconnected(uint32_t window) override; | 282 void OnEmbeddedAppDisconnected(uint32_t window) override; |
283 void OnUnembed(Id window_id) override; | 283 void OnUnembed(Id window_id) override; |
284 void OnLostCapture(Id window_id) override; | 284 void OnLostCapture(Id window_id) override; |
285 void OnTopLevelCreated(uint32_t change_id, | 285 void OnTopLevelCreated(uint32_t change_id, |
286 mojom::WindowDataPtr data, | 286 mojom::WindowDataPtr data, |
287 bool drawn) override; | 287 bool drawn) override; |
288 void OnWindowBoundsChanged(uint32_t window, | 288 void OnWindowBoundsChanged(uint32_t window, |
289 mojo::RectPtr old_bounds, | 289 const gfx::Rect& old_bounds, |
290 mojo::RectPtr new_bounds) override; | 290 const gfx::Rect& new_bounds) override; |
291 void OnClientAreaChanged( | 291 void OnClientAreaChanged( |
292 uint32_t window_id, | 292 uint32_t window_id, |
293 mojo::InsetsPtr new_client_area, | 293 const gfx::Insets& new_client_area, |
294 mojo::Array<mojo::RectPtr> new_additional_client_areas) override; | 294 mojo::Array<gfx::Rect> new_additional_client_areas) override; |
295 void OnTransientWindowAdded(uint32_t window_id, | 295 void OnTransientWindowAdded(uint32_t window_id, |
296 uint32_t transient_window_id) override; | 296 uint32_t transient_window_id) override; |
297 void OnTransientWindowRemoved(uint32_t window_id, | 297 void OnTransientWindowRemoved(uint32_t window_id, |
298 uint32_t transient_window_id) override; | 298 uint32_t transient_window_id) override; |
299 void OnWindowViewportMetricsChanged( | 299 void OnWindowViewportMetricsChanged( |
300 mojo::Array<uint32_t> window_ids, | 300 mojo::Array<uint32_t> window_ids, |
301 mojom::ViewportMetricsPtr old_metrics, | 301 mojom::ViewportMetricsPtr old_metrics, |
302 mojom::ViewportMetricsPtr new_metrics) override; | 302 mojom::ViewportMetricsPtr new_metrics) override; |
303 void OnWindowHierarchyChanged( | 303 void OnWindowHierarchyChanged( |
304 uint32_t window, | 304 uint32_t window, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 503 |
504 // Creates a new visible window as a child of the single root of |tree|. | 504 // Creates a new visible window as a child of the single root of |tree|. |
505 // |client_id| set to the ClientWindowId of the new window. | 505 // |client_id| set to the ClientWindowId of the new window. |
506 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 506 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
507 | 507 |
508 } // namespace test | 508 } // namespace test |
509 } // namespace ws | 509 } // namespace ws |
510 } // namespace mus | 510 } // namespace mus |
511 | 511 |
512 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ | 512 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ |
OLD | NEW |