| Index: components/mus/ws/window_tree.h
|
| diff --git a/components/mus/ws/window_tree.h b/components/mus/ws/window_tree.h
|
| index ab8e62430d50ff6c05aee7172d83ae7ed5f9990c..40d44f771050d6b18495d5a731f57540ac05b8c7 100644
|
| --- a/components/mus/ws/window_tree.h
|
| +++ b/components/mus/ws/window_tree.h
|
| @@ -39,6 +39,7 @@ namespace ws {
|
| class AccessPolicy;
|
| class DisplayManager;
|
| class Display;
|
| +class EventTester;
|
| class ServerWindow;
|
| class TargetedEvent;
|
| class WindowManagerState;
|
| @@ -207,6 +208,9 @@ class WindowTree : public mojom::WindowTree,
|
| const ServerWindow* transient_window,
|
| bool originated_change);
|
|
|
| + // Sends this event to the client if it matches an active event observer.
|
| + void SendToEventObserver(const ui::Event& event);
|
| +
|
| private:
|
| friend class test::WindowTreeTestApi;
|
|
|
| @@ -335,6 +339,8 @@ class WindowTree : public mojom::WindowTree,
|
| override;
|
| void SetCapture(uint32_t change_id, Id window_id) override;
|
| void ReleaseCapture(uint32_t change_id, Id window_id) override;
|
| + void SetEventObserver(mojom::EventMatcherPtr matcher) override;
|
| + void ClearEventObserver() override;
|
| void SetWindowBounds(uint32_t change_id,
|
| Id window_id,
|
| mojo::RectPtr bounds) override;
|
| @@ -429,6 +435,10 @@ class WindowTree : public mojom::WindowTree,
|
|
|
| uint32_t event_ack_id_;
|
|
|
| + // Set when the client is using SetEventObserver() to observe events,
|
| + // otherwise null.
|
| + std::unique_ptr<EventTester> event_observer_tester_;
|
| +
|
| // WindowManager the current event came from.
|
| WindowManagerState* event_source_wms_ = nullptr;
|
|
|
|
|