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

Unified Diff: components/mus/ws/test_utils.h

Issue 1909733002: mus: Add EventObserver to allow passively listening to UI events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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: components/mus/ws/test_utils.h
diff --git a/components/mus/ws/test_utils.h b/components/mus/ws/test_utils.h
index e10672bbd40d9a306c87b8093d1c3b220369f20c..1d4126157f2413444d64a600cc5c2ba1129a52ca 100644
--- a/components/mus/ws/test_utils.h
+++ b/components/mus/ws/test_utils.h
@@ -76,6 +76,9 @@ class WindowTreeTestApi {
void ClearAck() { tree_->event_ack_id_ = 0; }
void EnableCapture() { tree_->event_ack_id_ = 1u; }
+ void SetEventObserver(mojom::EventMatcherPtr matcher);
+ void ClearEventObserver();
+
private:
WindowTree* tree_;
@@ -290,6 +293,7 @@ class TestWindowTreeClient : public mus::mojom::WindowTreeClient {
void OnWindowInputEvent(uint32_t event_id,
uint32_t window,
mojom::EventPtr event) override;
+ void OnEventObserved(mojom::EventPtr event) override;
void OnWindowFocused(uint32_t focused_window_id) override;
void OnWindowPredefinedCursorChanged(uint32_t window_id,
mojom::Cursor cursor_id) override;

Powered by Google App Engine
This is Rietveld 408576698