Index: services/ui/public/cpp/window_tree_client.h |
diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h |
index 07b6635c5f0a2d65b7d0b31ad193d341250120a3..50e29f3747ec69eaf2ca5a6ee4c5031b474d0167 100644 |
--- a/services/ui/public/cpp/window_tree_client.h |
+++ b/services/ui/public/cpp/window_tree_client.h |
@@ -179,7 +179,8 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
// See description in window_tree.mojom. When an existing event observer is |
// updated or cleared then any future events from the server for that observer |
// will be ignored. |
- void SetEventObserver(mojom::EventMatcherPtr matcher); |
+ uint32_t AddEventObserver(mojom::EventMatcherPtr matcher); |
+ void RemoveEventObserver(uint32_t event_observer_id); |
// Performs a window move. |callback| will be asynchronously called with the |
// whether the move loop completed successfully. |
@@ -307,9 +308,9 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
void OnWindowInputEvent(uint32_t event_id, |
Id window_id, |
std::unique_ptr<ui::Event> event, |
- uint32_t event_observer_id) override; |
+ mojo::Array<uint32_t> event_observer_ids) override; |
void OnEventObserved(std::unique_ptr<ui::Event> event, |
- uint32_t event_observer_id) override; |
+ mojo::Array<uint32_t> event_observer_ids) override; |
void OnWindowFocused(Id focused_window_id) override; |
void OnWindowPredefinedCursorChanged(Id window_id, |
mojom::Cursor cursor) override; |
@@ -359,6 +360,10 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
const gfx::Vector2d& offset, |
const gfx::Insets& hit_area) override; |
+ // Returns true if there is an id in event_observer_ids_ that matches |
+ // this event_observer_id. |
+ bool MatchEventObserverId(uint32_t event_observer_id); |
+ |
// The one int in |cursor_location_mapping_|. When we read from this |
// location, we must always read from it atomically. |
base::subtle::Atomic32* cursor_location_memory() { |
@@ -410,10 +415,9 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
window_manager_internal_; |
mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_; |
- bool has_event_observer_ = false; |
- |
// Monotonically increasing ID for event observers. |
uint32_t event_observer_id_ = 0u; |
+ std::vector<uint32_t> event_observer_ids_; |
// The current change id for the client. |
uint32_t current_move_loop_change_ = 0u; |