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

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

Issue 2761233003: Adds ability for accelerators to add key/value pairs to KeyEvent (Closed)
Patch Set: feedback and compile Created 3 years, 9 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/window_manager_client_unittest.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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 tree_->SetEventTargetingPolicy(transport_window_id, policy); 110 tree_->SetEventTargetingPolicy(transport_window_id, policy);
111 } 111 }
112 void AckOldestEvent( 112 void AckOldestEvent(
113 mojom::EventResult result = mojom::EventResult::UNHANDLED) { 113 mojom::EventResult result = mojom::EventResult::UNHANDLED) {
114 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); 114 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result);
115 } 115 }
116 void EnableCapture() { tree_->event_ack_id_ = 1u; } 116 void EnableCapture() { tree_->event_ack_id_ = 1u; }
117 void AckLastEvent(mojom::EventResult result) { 117 void AckLastEvent(mojom::EventResult result) {
118 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); 118 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result);
119 } 119 }
120 void AckLastAccelerator(mojom::EventResult result) { 120 void AckLastAccelerator(
121 tree_->OnAcceleratorAck(tree_->event_ack_id_, result); 121 mojom::EventResult result,
122 const std::unordered_map<std::string, std::vector<uint8_t>>& properties =
123 std::unordered_map<std::string, std::vector<uint8_t>>()) {
124 tree_->OnAcceleratorAck(tree_->event_ack_id_, result, properties);
122 } 125 }
123 126
124 void StartPointerWatcher(bool want_moves); 127 void StartPointerWatcher(bool want_moves);
125 void StopPointerWatcher(); 128 void StopPointerWatcher();
126 129
127 private: 130 private:
128 WindowTree* tree_; 131 WindowTree* tree_;
129 132
130 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); 133 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi);
131 }; 134 };
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 677 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
675 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 678 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
676 ServerWindow* parent, 679 ServerWindow* parent,
677 ClientWindowId* client_id = nullptr); 680 ClientWindowId* client_id = nullptr);
678 681
679 } // namespace test 682 } // namespace test
680 } // namespace ws 683 } // namespace ws
681 } // namespace ui 684 } // namespace ui
682 685
683 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 686 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « services/ui/ws/test_change_tracker.cc ('k') | services/ui/ws/window_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698