Chromium Code Reviews| 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) { |
|
dcheng
2016/05/20 17:44:19
Once we have a StructTraits for mojo::RectPtr -> g
James Cook
2016/05/20 17:59:48
I just talked to rockot@. Apparently there's a nul
|
| + 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) { |