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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 mojom::EventResult::UNHANDLED); | 103 mojom::EventResult::UNHANDLED); |
104 } | 104 } |
105 void EnableCapture() { tree_->event_ack_id_ = 1u; } | 105 void EnableCapture() { tree_->event_ack_id_ = 1u; } |
106 void AckLastEvent(mojom::EventResult result) { | 106 void AckLastEvent(mojom::EventResult result) { |
107 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); | 107 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); |
108 } | 108 } |
109 void AckLastAccelerator(mojom::EventResult result) { | 109 void AckLastAccelerator(mojom::EventResult result) { |
110 tree_->OnAcceleratorAck(tree_->event_ack_id_, result); | 110 tree_->OnAcceleratorAck(tree_->event_ack_id_, result); |
111 } | 111 } |
112 | 112 |
113 void SetEventObserver(mojom::EventMatcherPtr matcher, | 113 void StartPointerWatcher(bool want_moves, uint32_t pointer_watcher_id); |
114 uint32_t event_observer_id); | 114 void StopPointerWatcher(); |
115 | 115 |
116 private: | 116 private: |
117 WindowTree* tree_; | 117 WindowTree* tree_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); | 119 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); |
120 }; | 120 }; |
121 | 121 |
122 // ----------------------------------------------------------------------------- | 122 // ----------------------------------------------------------------------------- |
123 | 123 |
124 class DisplayTestApi { | 124 class DisplayTestApi { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 float old_opacity, | 395 float old_opacity, |
396 float new_opacity) override; | 396 float new_opacity) override; |
397 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; | 397 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; |
398 void OnWindowSharedPropertyChanged(uint32_t window, | 398 void OnWindowSharedPropertyChanged(uint32_t window, |
399 const mojo::String& name, | 399 const mojo::String& name, |
400 mojo::Array<uint8_t> new_data) override; | 400 mojo::Array<uint8_t> new_data) override; |
401 void OnWindowInputEvent(uint32_t event_id, | 401 void OnWindowInputEvent(uint32_t event_id, |
402 uint32_t window, | 402 uint32_t window, |
403 std::unique_ptr<ui::Event> event, | 403 std::unique_ptr<ui::Event> event, |
404 uint32_t event_observer_id) override; | 404 uint32_t event_observer_id) override; |
405 void OnEventObserved(std::unique_ptr<ui::Event> event, | 405 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, |
406 uint32_t event_observer_id) override; | 406 uint32_t event_observer_id) override; |
407 void OnWindowFocused(uint32_t focused_window_id) override; | 407 void OnWindowFocused(uint32_t focused_window_id) override; |
408 void OnWindowPredefinedCursorChanged(uint32_t window_id, | 408 void OnWindowPredefinedCursorChanged(uint32_t window_id, |
409 mojom::Cursor cursor_id) override; | 409 mojom::Cursor cursor_id) override; |
410 void OnChangeCompleted(uint32_t change_id, bool success) override; | 410 void OnChangeCompleted(uint32_t change_id, bool success) override; |
411 void RequestClose(uint32_t window_id) override; | 411 void RequestClose(uint32_t window_id) override; |
412 void GetWindowManager( | 412 void GetWindowManager( |
413 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; | 413 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; |
414 | 414 |
415 TestChangeTracker tracker_; | 415 TestChangeTracker tracker_; |
416 mojo::Binding<mojom::WindowTreeClient> binding_; | 416 mojo::Binding<mojom::WindowTreeClient> binding_; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 572 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
573 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 573 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
574 ServerWindow* parent, | 574 ServerWindow* parent, |
575 ClientWindowId* client_id); | 575 ClientWindowId* client_id); |
576 | 576 |
577 } // namespace test | 577 } // namespace test |
578 } // namespace ws | 578 } // namespace ws |
579 } // namespace ui | 579 } // namespace ui |
580 | 580 |
581 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 581 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |