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..15eec8ca724d414da8083a18a97c0cad93773553 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,13 @@ 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. |
| + SetEventObserver(EventMatcher matcher); |
|
sky
2016/04/21 17:23:03
Declare this as EventMatcher?, then you can pass i
James Cook
2016/04/22 18:22:54
Done.
|
| + ClearEventObserver(); |
| + |
| // Sets the specified bounds of the specified window. |
| SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); |
| @@ -362,6 +370,10 @@ interface WindowTreeClient { |
| // the event is ack'ed. |
| OnWindowInputEvent(uint32 event_id, uint32 window, Event event); |
| + // Invoked when an event is sent via the EventObserver. Not targeted at a |
| + // specific window. The client does not need to acknowledge these events. |
| + 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 |
| // window not known to the connection. In the later case |focused_window_id| |