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

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: comments 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
Index: services/ui/ws/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index 11627217555415ec5c77f0cb8f305387220d5bd5..8bc6a0c2b43b70c07e249b671ba5668ea5b65222 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);
@@ -262,6 +265,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_; }
@@ -290,7 +298,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;

Powered by Google App Engine
This is Rietveld 408576698