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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

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: rebase 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/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 6e26c35de28232d7c6649369a7cf43d8a9e9fe20..c377a8ffc75064da17b0fb218d69447c3c597d40 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -865,7 +865,11 @@ void WindowTreeClientImpl::OnWindowSharedPropertyChanged(
void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id,
Id window_id,
- mojom::EventPtr event) {
+ mojom::EventPtr event,
+ uint32_t event_observer_id) {
+ // TODO(jamescook): If event_observer_id is non-zero, also route the event to
+ // PointerWatchers.
+
Window* window = GetWindowByServerId(window_id);
if (!window || !window->input_event_handler_) {
tree_->OnWindowInputEventAck(event_id, mojom::EventResult::UNHANDLED);
@@ -885,6 +889,11 @@ void WindowTreeClientImpl::OnWindowInputEvent(uint32_t event_id,
ack_callback->Run(mojom::EventResult::UNHANDLED);
}
+void WindowTreeClientImpl::OnEventObserved(mojom::EventPtr event_in,
+ uint32_t event_observer_id) {
+ // TODO(jamescook): Route the observed event to PointerWatchers.
+}
+
void WindowTreeClientImpl::OnWindowFocused(Id focused_window_id) {
Window* focused_window = GetWindowByServerId(focused_window_id);
InFlightFocusChange new_change(this, focused_window);

Powered by Google App Engine
This is Rietveld 408576698