Index: components/mus/ws/event_dispatcher.h |
diff --git a/components/mus/ws/event_dispatcher.h b/components/mus/ws/event_dispatcher.h |
index bbd2badce05cc8188c60cb9e6f660d5cc5e29568..c5292d35df11c9ed5988a0508f27c496a315d19c 100644 |
--- a/components/mus/ws/event_dispatcher.h |
+++ b/components/mus/ws/event_dispatcher.h |
@@ -33,6 +33,10 @@ class EventDispatcher : public ServerWindowObserver { |
void set_surface_id(cc::SurfaceId surface_id) { surface_id_ = surface_id; } |
+ ServerWindow* capture_window() { return capture_window_; } |
+ const ServerWindow* capture_window() const { return capture_window_; } |
+ void SetCaptureWindow(ServerWindow* capture_window); |
+ |
void AddAccelerator(uint32_t id, mojom::EventMatcherPtr event_matcher); |
void RemoveAccelerator(uint32_t id); |
@@ -67,6 +71,10 @@ class EventDispatcher : public ServerWindowObserver { |
void DispatchToPointerTarget(const PointerTarget& target, |
mojom::EventPtr event); |
+ // Cancels all implicit capture. This is called when the explicit capture |
+ // state changes. |
+ void CancelAllPointerEvents(); |
+ |
// Stops sending pointer events to |window|. This does not remove the entry |
// for |window| from |pointer_targets_|, rather it nulls out the window. This |
// way we continue to eat events until the up/cancel is received. |
@@ -91,6 +99,7 @@ class EventDispatcher : public ServerWindowObserver { |
EventDispatcherDelegate* delegate_; |
ServerWindow* root_; |
+ ServerWindow* capture_window_; |
cc::SurfaceId surface_id_; |