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

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

Issue 2089183003: mus: Introduce API for embedder to dispatch event to the embeded client. Base URL: https://chromium.googlesource.com/chromium/src.git@mus-parent-window-receives-child-event
Patch Set: Created 4 years, 6 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/window_tree_client.h ('k') | components/mus/ws/window_tree.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 96c2f73fe75fe7e9b36912a1be8b19bbab3d5b37..5a80108d437017c905c53dbeb60cedf907be2e51 100644
--- a/components/mus/public/interfaces/window_tree.mojom
+++ b/components/mus/public/interfaces/window_tree.mojom
@@ -16,6 +16,10 @@ import "ui/events/mojo/event.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "ui/platform_window/mojo/text_input_state.mojom";
+interface InputEventHandler {
+ OnInputEvent(uint32 window_id, ui.mojom.Event event) => (bool handled);
+};
+
// Windows are identified by a uint32. The upper 16 bits are the connection id,
// and the lower 16 the id assigned by the client.
//
@@ -196,7 +200,7 @@ interface WindowTree {
//
// The callback returns whether the embedding was successful.
Embed(uint32 window_id, WindowTreeClient client, uint32 embed_flags)
- => (bool success);
+ => (bool success, InputEventHandler? event_handler);
// Sets focus to the specified window, use 0 to clear focus. For a window to
// get focus the following has to happen: the window is drawn, the window has
@@ -362,6 +366,8 @@ interface WindowTreeClient {
// change ids for details.
OnChangeCompleted(uint32 change_id, bool success);
+ RequestInputEventHandler(InputEventHandler& handler);
+
// The WindowManager is requesting the specified window to close. If the
// client allows the change it should delete the window.
RequestClose(uint32 window_id);
« no previous file with comments | « components/mus/public/cpp/window_tree_client.h ('k') | components/mus/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698