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

Unified Diff: services/ui/public/interfaces/window_tree.mojom

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use PointerEvent. 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/public/interfaces/window_tree.mojom
diff --git a/services/ui/public/interfaces/window_tree.mojom b/services/ui/public/interfaces/window_tree.mojom
index 65416a8f11a6e8c3366d75dd359020292e505ba9..b36572c022074ead0e63bad82b19f290217345c2 100644
--- a/services/ui/public/interfaces/window_tree.mojom
+++ b/services/ui/public/interfaces/window_tree.mojom
@@ -80,15 +80,19 @@ interface WindowTree {
// if |window_id| does not currently have capture.
ReleaseCapture(uint32 change_id, uint32 window_id);
- // Sets an observer that monitors all events, even if they are not targeted
- // at a window in this tree. If an event matchs |matcher| the observer reports
- // it to the WindowTreeClient via OnWindowInputEvent (if the event target is
- // this window tree) or OnEventObserved (if the target is another tree). The
- // client must supply a non-zero |observer_id|, which is reported back with
- // observed events. Set the matcher to null to clear the observer.
+ // Starts the pointer watcher that monitors all events (including move events
+ // if |want_moves| is true), even if they are not targeted at a window in this
+ // tree. If an event matches the pointer watcher the observer reports it to
+ // the WindowTreeClient via OnWindowInputEvent (if the event target is this
+ // window tree) or OnEventObserved (if the target is another tree). The client
+ // must supply a non-zero |observer_id|, which is reported back with observed
+ // events.
//
James Cook 2016/07/27 01:54:01 I would add a note (or revise the above) to say th
riajiang 2016/07/27 22:39:16 Done.
// See class description for details on event delivery.
- SetEventObserver(EventMatcher? matcher, uint32 observer_id);
+ StartPointerWatcher(bool want_moves, uint32 observer_id);
+
+ // Stops the pointer watcher for all events.
+ StopPointerWatcher();
// Sets the specified bounds of the specified window.
SetWindowBounds(uint32 change_id, uint32 window_id, gfx.mojom.Rect bounds);
@@ -366,18 +370,18 @@ interface WindowTreeClient {
// Invoked when an event is targeted at the specified window. The client must
// call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify
// that the event has been processed, and with an EventResult value to notify
- // if the event was consumed. |event_observer_id| is non-zero if the event
- // also matched the active event observer for this client. The client will not
- // receive farther events until the event is ack'ed.
+ // if the event was consumed. |pointer_watcher_id| is non-zero if the event
+ // also matched the active pointer watcher for this client. The client will
+ // not receive farther events until the event is ack'ed.
OnWindowInputEvent(uint32 event_id,
uint32 window,
ui.mojom.Event event,
- uint32 event_observer_id);
+ uint32 pointer_watcher_id);
// Invoked when an |event| is sent via the EventObserver and not targeted at a
- // specific window. The |event_observer_id| is the one supplied to
- // SetEventObserver. The client should not acknowledge these events.
- OnEventObserved(ui.mojom.Event event, uint32 event_observer_id);
+ // specific window. The |pointer_watcher_id| is the one supplied to
+ // StartPointerWatcher. The client should not acknowledge these events.
+ OnEventObserved(ui.mojom.Event event, uint32 pointer_watcher_id);
James Cook 2016/07/27 01:54:01 I think this should be renamed to OnPointerWatcher
riajiang 2016/07/27 22:39:16 No worries, done :)
// Called in two distinct cases: when a window known to the connection gains
// focus, or when focus moves from a window known to the connection to a

Powered by Google App Engine
This is Rietveld 408576698