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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 float old_opacity, | 394 float old_opacity, |
395 float new_opacity) override; | 395 float new_opacity) override; |
396 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; | 396 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; |
397 void OnWindowSharedPropertyChanged(uint32_t window, | 397 void OnWindowSharedPropertyChanged(uint32_t window, |
398 const mojo::String& name, | 398 const mojo::String& name, |
399 mojo::Array<uint8_t> new_data) override; | 399 mojo::Array<uint8_t> new_data) override; |
400 void OnWindowInputEvent(uint32_t event_id, | 400 void OnWindowInputEvent(uint32_t event_id, |
401 uint32_t window, | 401 uint32_t window, |
402 std::unique_ptr<ui::Event> event, | 402 std::unique_ptr<ui::Event> event, |
403 uint32_t event_observer_id) override; | 403 uint32_t event_observer_id) override; |
404 void OnEventObserved(std::unique_ptr<ui::Event> event, | 404 void OnPointerWatcherEvent(std::unique_ptr<ui::Event> event, |
405 uint32_t event_observer_id) override; | 405 uint32_t event_observer_id) override; |
406 void OnWindowFocused(uint32_t focused_window_id) override; | 406 void OnWindowFocused(uint32_t focused_window_id) override; |
407 void OnWindowPredefinedCursorChanged(uint32_t window_id, | 407 void OnWindowPredefinedCursorChanged(uint32_t window_id, |
408 mojom::Cursor cursor_id) override; | 408 mojom::Cursor cursor_id) override; |
409 void OnChangeCompleted(uint32_t change_id, bool success) override; | 409 void OnChangeCompleted(uint32_t change_id, bool success) override; |
410 void RequestClose(uint32_t window_id) override; | 410 void RequestClose(uint32_t window_id) override; |
411 void GetWindowManager( | 411 void GetWindowManager( |
412 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; | 412 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; |
413 | 413 |
414 TestChangeTracker tracker_; | 414 TestChangeTracker tracker_; |
415 mojo::Binding<mojom::WindowTreeClient> binding_; | 415 mojo::Binding<mojom::WindowTreeClient> binding_; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 571 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
572 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 572 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
573 ServerWindow* parent, | 573 ServerWindow* parent, |
574 ClientWindowId* client_id); | 574 ClientWindowId* client_id); |
575 | 575 |
576 } // namespace test | 576 } // namespace test |
577 } // namespace ws | 577 } // namespace ws |
578 } // namespace ui | 578 } // namespace ui |
579 | 579 |
580 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 580 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |