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

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

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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') | ui/views/mus/native_widget_mus.h » ('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 0e6a4aa4700321693de6c0282cee1d2873756c3f..f276ad831a15eab4d987fbd50d1415b67d3bd9f3 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -1301,6 +1301,20 @@ void WindowTree::SetClientArea(
window->SetClientArea(insets.To<gfx::Insets>(), additional_client_areas);
}
+void WindowTree::SetHitTestMask(Id transport_window_id, mojo::RectPtr mask) {
+ ServerWindow* window =
+ GetWindowByClientId(ClientWindowId(transport_window_id));
+ if (!window || !access_policy_->CanSetHitTestMask(window)) {
+ DVLOG(1) << "SetHitTestMask failed";
+ return;
+ }
+
+ if (mask)
+ window->SetHitTestMask(mask.To<gfx::Rect>());
+ else
+ window->ClearHitTestMask();
+}
+
void WindowTree::Embed(Id transport_window_id,
mojom::WindowTreeClientPtr client,
const EmbedCallback& callback) {
« no previous file with comments | « components/mus/ws/window_tree.h ('k') | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698