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

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: add bug link for SkPath conversion 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
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..979ba5a65f772ad32bd45cd29b6b2347f58beece 100644
--- a/components/mus/ws/window_tree.cc
+++ b/components/mus/ws/window_tree.cc
@@ -1301,6 +1301,17 @@ 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;
+ }
+
+ window->set_hit_test_mask(mask.To<gfx::Rect>());
+}
+
void WindowTree::Embed(Id transport_window_id,
mojom::WindowTreeClientPtr client,
const EmbedCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698