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

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: . 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
Index: components/mus/ws/window_tree.cc
diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
index 359355746ec03046e0f6a7dc50c76c96f6a14086..655b01f18c3b16196bd1b4288415e8d1afa57ff3 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -319,7 +319,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);
@@ -327,6 +328,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;
}
@@ -1334,8 +1336,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) {

Powered by Google App Engine
This is Rietveld 408576698