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

Unified Diff: components/mus/ws/window_tree.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/window_tree.h ('k') | components/mus/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree.cc
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index f1dc0c89db7b249f99514aadae43252bfc10b238..b1d23e441c481f7ba82e374929b82cc7f0dc5d2d 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -349,7 +349,8 @@ bool WindowTree::SetFocus(const ClientWindowId& window_id) {
}
bool WindowTree::Embed(const ClientWindowId& window_id,
- mojom::WindowTreeClientPtr client) {
+ mojom::WindowTreeClientPtr client,
+ uint32_t flags) {
if (!client || !CanEmbed(window_id))
return false;
ServerWindow* window = GetWindowByClientId(window_id);
@@ -357,6 +358,7 @@ bool WindowTree::Embed(const ClientWindowId& window_id,
// When embedding we don't know the user id of where the TreeClient came
// from. Use an invalid id, which limits what the client is able to do.
window_server_->EmbedAtWindow(window, InvalidUserId(), std::move(client),
+ flags,
base::WrapUnique(new DefaultAccessPolicy));
return true;
}
@@ -1353,8 +1355,10 @@ void WindowTree::SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) {
void WindowTree::Embed(Id transport_window_id,
mojom::WindowTreeClientPtr client,
+ uint32_t flags,
const EmbedCallback& callback) {
- callback.Run(Embed(ClientWindowId(transport_window_id), std::move(client)));
+ callback.Run(
+ Embed(ClientWindowId(transport_window_id), std::move(client), flags));
}
void WindowTree::SetFocus(uint32_t change_id, Id transport_window_id) {
« no previous file with comments | « components/mus/ws/window_tree.h ('k') | components/mus/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698