Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: services/ui/ws/test_utils.h

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/test_change_tracker.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « services/ui/ws/test_change_tracker.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698