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

Unified Diff: components/mus/public/interfaces/window_tree.mojom

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/ws/access_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fad3dcdcf147e313cfb49d7e34d832ccf4a4f42a..5114297483828adedb1588f28466c90ea90faf2e 100644
--- a/components/mus/public/interfaces/window_tree.mojom
+++ b/components/mus/public/interfaces/window_tree.mojom
@@ -105,6 +105,18 @@ interface WindowTree {
// can delete it.
DeleteWindow(uint32 change_id, uint32 window_id);
+ // Requests input event capture for the given |window_id|. Capture is only
+ // allowed if the window is processing an event. When a window gains capture,
+ // current input events are canceled. The given window will receive all
+ // subsequent input until an alternate window is set via SetCapture, or
+ // ReleaseCapture is called for |window_id|. OnLostCapture is called to notify
+ // of capture ending.
+ SetCapture(uint32 change_id, uint32 window_id);
+
+ // Releases input event capture for the given |window_id|. This does nothing
+ // if |window_id| does not currently have capture.
+ ReleaseCapture(uint32 change_id, uint32 window_id);
+
// Sets the specified bounds of the specified window.
SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds);
@@ -265,6 +277,9 @@ interface WindowTreeClient {
// previously embedded in. See Embed() for more information.
OnUnembed(uint32 window);
+ // Sent when a window loses capture.
+ OnLostCapture(uint32 window);
+
// Called in response to NewTopLevelWindow() successfully completing.
OnTopLevelCreated(uint32 change_id, WindowData data);
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/ws/access_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698