Chromium Code Reviews| Index: components/mus/public/interfaces/window_tree.mojom |
| diff --git a/components/mus/public/interfaces/window_tree.mojom b/components/mus/public/interfaces/window_tree.mojom |
| index eb2ef580ef31b7b8fb99e0eab0494d16f6976ed4..698047c14ceed65497f18a0bd8d1ad6ce76dbbad 100644 |
| --- a/components/mus/public/interfaces/window_tree.mojom |
| +++ b/components/mus/public/interfaces/window_tree.mojom |
| @@ -7,6 +7,7 @@ module mus.mojom; |
| import "components/mus/public/interfaces/compositor_frame.mojom"; |
| import "components/mus/public/interfaces/cursor.mojom"; |
| import "components/mus/public/interfaces/input_events.mojom"; |
| +import "components/mus/public/interfaces/input_event_matcher.mojom"; |
| import "components/mus/public/interfaces/mus_constants.mojom"; |
| import "components/mus/public/interfaces/surface_id.mojom"; |
| import "components/mus/public/interfaces/window_manager.mojom"; |
| @@ -109,6 +110,12 @@ 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 OnEventObserved(). Each client may only have |
| + // one observer at a time. Set the matcher to null to clear the observer. |
| + SetEventObserver(EventMatcher? matcher); |
| + |
| // Sets the specified bounds of the specified window. |
| SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); |
| @@ -358,9 +365,17 @@ 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. The client will not receive farther events until |
| - // the event is ack'ed. |
| - OnWindowInputEvent(uint32 event_id, uint32 window, Event event); |
| + // if the event was consumed. |matched_observer| is true 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. |
| + OnWindowInputEvent(uint32 event_id, |
| + uint32 window, |
| + Event event, |
| + bool matched_observer); |
|
sky
2016/04/22 20:18:48
Rather than a bool for matched_observer I think yo
James Cook
2016/04/22 21:25:08
Done.
|
| + |
| + // Invoked when an event is sent via the EventObserver and not targeted at a |
| + // specific window. The client does not need to acknowledge these events. |
|
sky
2016/04/22 20:18:48
'does not need to' -> should not
James Cook
2016/04/22 21:25:08
Done.
|
| + OnEventObserved(Event event); |
| // 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 |