Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: components/mus/ws/event_dispatcher.h

Issue 1352043005: mus: Implement Window Server Capture Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added capture unit tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698