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

Side by Side Diff: components/mus/public/interfaces/window_tree.mojom

Issue 2068093002: mus: Allow embedder to intercept events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module mus.mojom; 5 module mus.mojom;
6 6
7 import "cc/ipc/surface_id.mojom"; 7 import "cc/ipc/surface_id.mojom";
8 import "components/mus/public/interfaces/cursor.mojom"; 8 import "components/mus/public/interfaces/cursor.mojom";
9 import "components/mus/public/interfaces/event_matcher.mojom"; 9 import "components/mus/public/interfaces/event_matcher.mojom";
10 import "components/mus/public/interfaces/mus_constants.mojom"; 10 import "components/mus/public/interfaces/mus_constants.mojom";
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // A connection may grant access to another connection by way of Embed(). 171 // A connection may grant access to another connection by way of Embed().
172 // Embed() results in the supplied WindowTreeClient being configured with a 172 // Embed() results in the supplied WindowTreeClient being configured with a
173 // root window of |window_id|. The supplied WindowTreeClient may create child 173 // root window of |window_id|. The supplied WindowTreeClient may create child
174 // windows and do other various tree operations (including Embed()), but does 174 // windows and do other various tree operations (including Embed()), but does
175 // not see nor have access to any of the windows above the embed point. 175 // not see nor have access to any of the windows above the embed point.
176 // 176 //
177 // The caller must have created |window_id|. If not the request fails and the 177 // The caller must have created |window_id|. If not the request fails and the
178 // response is false. 178 // response is false.
179 // 179 //
180 // The embedder can dictate the behaviour of the embedded client by setting
181 // the appropriate embed flags (e.g. kEmbedFlagEmbedderInterceptsEvents).
182 //
180 // When a connection embeds a WindowTreeClient the originating connection no 183 // When a connection embeds a WindowTreeClient the originating connection no
181 // longer has privileges to access or see any of the children of the window. 184 // longer has privileges to access or see any of the children of the window.
182 // If the window had existing children the children are removed. The 185 // If the window had existing children the children are removed. The
183 // WindowManager gets to see the whole tree. 186 // WindowManager gets to see the whole tree.
184 // 187 //
185 // A window may only have one embedding in it at a time. Subsequent calls to 188 // A window may only have one embedding in it at a time. Subsequent calls to
186 // Embed() for the same window result in the currently embedded 189 // Embed() for the same window result in the currently embedded
187 // WindowTreeClient being removed. The embedded app is told this by way of 190 // WindowTreeClient being removed. The embedded app is told this by way of
188 // OnUnembed(), which is followed by OnWindowDeleted() (as the connection no 191 // OnUnembed(), which is followed by OnWindowDeleted() (as the connection no
189 // longer has access to the window). 192 // longer has access to the window).
190 // 193 //
191 // The embedder can detect when the embedded app disconnects by way of 194 // The embedder can detect when the embedded app disconnects by way of
192 // OnEmbeddedAppDisconnected(). 195 // OnEmbeddedAppDisconnected().
193 // 196 //
194 // The callback returns whether the embedding was successful. 197 // The callback returns whether the embedding was successful.
195 Embed(uint32 window_id, WindowTreeClient client) => (bool success); 198 Embed(uint32 window_id, WindowTreeClient client, uint32 embed_flags)
199 => (bool success);
196 200
197 // Sets focus to the specified window, use 0 to clear focus. For a window to 201 // Sets focus to the specified window, use 0 to clear focus. For a window to
198 // get focus the following has to happen: the window is drawn, the window has 202 // get focus the following has to happen: the window is drawn, the window has
199 // been marked as focusable (see SetCanFocus()) and the window is in a 203 // been marked as focusable (see SetCanFocus()) and the window is in a
200 // container the WindowManager has identified as allowing activation 204 // container the WindowManager has identified as allowing activation
201 // (see WindowManagerClient::AddActivationParent()). 205 // (see WindowManagerClient::AddActivationParent()).
202 SetFocus(uint32 change_id, uint32 window_id); 206 SetFocus(uint32 change_id, uint32 window_id);
203 207
204 // Marks the specified window as being able to receive focus. 208 // Marks the specified window as being able to receive focus.
205 SetCanFocus(uint32 window_id, bool can_focus); 209 SetCanFocus(uint32 window_id, bool can_focus);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // See description of WindowManager for details. 369 // See description of WindowManager for details.
366 GetWindowManager(associated WindowManager& internal); 370 GetWindowManager(associated WindowManager& internal);
367 }; 371 };
368 372
369 // Mus provides this interface as a way for clients to connect and obtain a 373 // Mus provides this interface as a way for clients to connect and obtain a
370 // WindowTree handle with a supplied WindowTreeClient handle. The 374 // WindowTree handle with a supplied WindowTreeClient handle. The
371 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 375 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
372 interface WindowTreeFactory { 376 interface WindowTreeFactory {
373 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 377 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
374 }; 378 };
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window_tree_client.h ('k') | components/mus/public/interfaces/window_tree_constants.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698