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 SERVICES_UI_WS_TEST_UTILS_H_ | 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ |
6 #define SERVICES_UI_WS_TEST_UTILS_H_ | 6 #define SERVICES_UI_WS_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 bool on_perform_move_loop_called() { return on_perform_move_loop_called_; } | 317 bool on_perform_move_loop_called() { return on_perform_move_loop_called_; } |
318 bool on_accelerator_called() { return on_accelerator_called_; } | 318 bool on_accelerator_called() { return on_accelerator_called_; } |
319 uint32_t on_accelerator_id() { return on_accelerator_id_; } | 319 uint32_t on_accelerator_id() { return on_accelerator_id_; } |
320 bool got_display_removed() const { return got_display_removed_; } | 320 bool got_display_removed() const { return got_display_removed_; } |
321 int64_t display_removed_id() const { return display_removed_id_; } | 321 int64_t display_removed_id() const { return display_removed_id_; } |
322 bool on_set_modal_type_called() { return on_set_modal_type_called_; } | 322 bool on_set_modal_type_called() { return on_set_modal_type_called_; } |
323 | 323 |
324 private: | 324 private: |
325 // WindowManager: | 325 // WindowManager: |
326 void OnConnect(uint16_t client_id) override {} | 326 void OnConnect(uint16_t client_id) override {} |
327 void WmNewDisplayAdded(const display::Display& display, | 327 void WmNewDisplayAdded( |
328 ui::mojom::WindowDataPtr root, | 328 const display::Display& display, |
329 bool drawn, | 329 ui::mojom::WindowDataPtr root, |
330 const cc::FrameSinkId& frame_sink_id) override {} | 330 bool drawn, |
| 331 const cc::FrameSinkId& frame_sink_id, |
| 332 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override {} |
331 void WmDisplayRemoved(int64_t display_id) override; | 333 void WmDisplayRemoved(int64_t display_id) override; |
332 void WmDisplayModified(const display::Display& display) override {} | 334 void WmDisplayModified(const display::Display& display) override {} |
333 void WmSetBounds(uint32_t change_id, | 335 void WmSetBounds(uint32_t change_id, |
334 uint32_t window_id, | 336 uint32_t window_id, |
335 const gfx::Rect& bounds) override {} | 337 const gfx::Rect& bounds) override {} |
336 void WmSetProperty( | 338 void WmSetProperty( |
337 uint32_t change_id, | 339 uint32_t change_id, |
338 uint32_t window_id, | 340 uint32_t window_id, |
339 const std::string& name, | 341 const std::string& name, |
340 const base::Optional<std::vector<uint8_t>>& value) override {} | 342 const base::Optional<std::vector<uint8_t>>& value) override {} |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 TestChangeTracker* tracker() { return &tracker_; } | 395 TestChangeTracker* tracker() { return &tracker_; } |
394 | 396 |
395 void Bind(mojo::InterfaceRequest<mojom::WindowTreeClient> request); | 397 void Bind(mojo::InterfaceRequest<mojom::WindowTreeClient> request); |
396 | 398 |
397 void set_record_on_change_completed(bool value) { | 399 void set_record_on_change_completed(bool value) { |
398 record_on_change_completed_ = value; | 400 record_on_change_completed_ = value; |
399 } | 401 } |
400 | 402 |
401 private: | 403 private: |
402 // WindowTreeClient: | 404 // WindowTreeClient: |
403 void OnEmbed(uint16_t client_id, | 405 void OnEmbed( |
404 mojom::WindowDataPtr root, | 406 uint16_t client_id, |
405 ui::mojom::WindowTreePtr tree, | 407 mojom::WindowDataPtr root, |
406 int64_t display_id, | 408 ui::mojom::WindowTreePtr tree, |
407 Id focused_window_id, | 409 int64_t display_id, |
408 bool drawn, | 410 Id focused_window_id, |
409 const cc::FrameSinkId& frame_sink_id) override; | 411 bool drawn, |
| 412 const cc::FrameSinkId& frame_sink_id, |
| 413 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; |
410 void OnEmbeddedAppDisconnected(uint32_t window) override; | 414 void OnEmbeddedAppDisconnected(uint32_t window) override; |
411 void OnUnembed(Id window_id) override; | 415 void OnUnembed(Id window_id) override; |
412 void OnCaptureChanged(Id new_capture_window_id, | 416 void OnCaptureChanged(Id new_capture_window_id, |
413 Id old_capture_window_id) override; | 417 Id old_capture_window_id) override; |
414 void OnFrameSinkIdAllocated(Id window_id, | 418 void OnFrameSinkIdAllocated(Id window_id, |
415 const cc::FrameSinkId& frame_sink_id) override; | 419 const cc::FrameSinkId& frame_sink_id) override; |
416 void OnTopLevelCreated(uint32_t change_id, | 420 void OnTopLevelCreated( |
417 mojom::WindowDataPtr data, | 421 uint32_t change_id, |
418 int64_t display_id, | 422 mojom::WindowDataPtr data, |
419 bool drawn, | 423 int64_t display_id, |
420 const cc::FrameSinkId& frame_sink_id) override; | 424 bool drawn, |
| 425 const cc::FrameSinkId& frame_sink_id, |
| 426 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; |
421 void OnWindowBoundsChanged( | 427 void OnWindowBoundsChanged( |
422 uint32_t window, | 428 uint32_t window, |
423 const gfx::Rect& old_bounds, | 429 const gfx::Rect& old_bounds, |
424 const gfx::Rect& new_bounds, | 430 const gfx::Rect& new_bounds, |
425 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; | 431 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; |
426 void OnClientAreaChanged( | 432 void OnClientAreaChanged( |
427 uint32_t window_id, | 433 uint32_t window_id, |
428 const gfx::Insets& new_client_area, | 434 const gfx::Insets& new_client_area, |
429 const std::vector<gfx::Rect>& new_additional_client_areas) override; | 435 const std::vector<gfx::Rect>& new_additional_client_areas) override; |
430 void OnTransientWindowAdded(uint32_t window_id, | 436 void OnTransientWindowAdded(uint32_t window_id, |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 695 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
690 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 696 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
691 ServerWindow* parent, | 697 ServerWindow* parent, |
692 ClientWindowId* client_id = nullptr); | 698 ClientWindowId* client_id = nullptr); |
693 | 699 |
694 } // namespace test | 700 } // namespace test |
695 } // namespace ws | 701 } // namespace ws |
696 } // namespace ui | 702 } // namespace ui |
697 | 703 |
698 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 704 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |