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

Unified Diff: services/ui/ws/test_utils.h

Issue 2125883003: Adds ability for pre-target accelerators to not consume events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/event_dispatcher_unittest.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index 18ec3213215ed85661d2843284b93578729e7b14..e701b55deb5e7b23b12ab959538856cece40ee27 100644
--- a/services/ui/ws/test_utils.h
+++ b/services/ui/ws/test_utils.h
@@ -102,6 +102,9 @@ class WindowTreeTestApi {
void AckLastEvent(mojom::EventResult result) {
tree_->OnWindowInputEventAck(tree_->event_ack_id_, result);
}
+ void AckLastAccelerator(mojom::EventResult result) {
+ tree_->OnAcceleratorAck(tree_->event_ack_id_, result);
+ }
void SetEventObserver(mojom::EventMatcherPtr matcher,
uint32_t event_observer_id);
@@ -282,6 +285,11 @@ class TestWindowManager : public mojom::WindowManager {
return true;
}
+ void ClearAcceleratorCalled() {
+ on_accelerator_id_ = 0u;
+ on_accelerator_called_ = false;
+ }
+
bool on_perform_move_loop_called() { return on_perform_move_loop_called_; }
bool on_accelerator_called() { return on_accelerator_called_; }
uint32_t on_accelerator_id() { return on_accelerator_id_; }
@@ -310,7 +318,9 @@ class TestWindowManager : public mojom::WindowManager {
mojom::MoveLoopSource source,
const gfx::Point& cursor_location) override;
void WmCancelMoveLoop(uint32_t window_id) override;
- void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override;
+ void OnAccelerator(uint32_t ack_id,
+ uint32_t accelerator_id,
+ std::unique_ptr<ui::Event> event) override;
bool on_perform_move_loop_called_ = false;
« no previous file with comments | « services/ui/ws/event_dispatcher_unittest.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698