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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 void WindowTreeClientImpl::SetClientArea( 306 void WindowTreeClientImpl::SetClientArea(
307 Id window_id, 307 Id window_id,
308 const gfx::Insets& client_area, 308 const gfx::Insets& client_area,
309 const std::vector<gfx::Rect>& additional_client_areas) { 309 const std::vector<gfx::Rect>& additional_client_areas) {
310 DCHECK(tree_); 310 DCHECK(tree_);
311 tree_->SetClientArea( 311 tree_->SetClientArea(
312 window_id, mojo::Insets::From(client_area), 312 window_id, mojo::Insets::From(client_area),
313 mojo::Array<mojo::RectPtr>::From(additional_client_areas)); 313 mojo::Array<mojo::RectPtr>::From(additional_client_areas));
314 } 314 }
315 315
316 void WindowTreeClientImpl::SetHitTestMask(Id window_id, const gfx::Rect& mask) {
317 DCHECK(tree_);
318 tree_->SetHitTestMask(window_id, mojo::Rect::From(mask));
319 }
320
316 void WindowTreeClientImpl::SetFocus(Window* window) { 321 void WindowTreeClientImpl::SetFocus(Window* window) {
317 // In order for us to get here we had to have exposed a window, which implies 322 // In order for us to get here we had to have exposed a window, which implies
318 // we got a connection. 323 // we got a connection.
319 DCHECK(tree_); 324 DCHECK(tree_);
320 const uint32_t change_id = ScheduleInFlightChange( 325 const uint32_t change_id = ScheduleInFlightChange(
321 base::WrapUnique(new InFlightFocusChange(this, focused_window_))); 326 base::WrapUnique(new InFlightFocusChange(this, focused_window_)));
322 tree_->SetFocus(change_id, window ? server_id(window) : 0); 327 tree_->SetFocus(change_id, window ? server_id(window) : 0);
323 LocalSetFocus(window); 328 LocalSetFocus(window);
324 } 329 }
325 330
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 const gfx::Vector2d& offset, 1133 const gfx::Vector2d& offset,
1129 const gfx::Insets& hit_area) { 1134 const gfx::Insets& hit_area) {
1130 if (window_manager_internal_client_) { 1135 if (window_manager_internal_client_) {
1131 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1136 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1132 server_id(window), offset.x(), offset.y(), 1137 server_id(window), offset.x(), offset.y(),
1133 mojo::Insets::From(hit_area)); 1138 mojo::Insets::From(hit_area));
1134 } 1139 }
1135 } 1140 }
1136 1141
1137 } // namespace mus 1142 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698