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

Unified Diff: services/ui/ws/window_tree.cc

Issue 2179273002: Mojo C++ bindings: support mapping T and T? differently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « services/ui/ws/window_tree.h ('k') | skia/public/interfaces/skbitmap.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 0206327b3029fe4a72b98b55812605d6bcc98571..938aabc73c22a5368efae10dec1742d486e940ee 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -1366,7 +1366,8 @@ void WindowTree::SetClientArea(
window->SetClientArea(insets, additional_client_areas);
}
-void WindowTree::SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) {
+void WindowTree::SetHitTestMask(Id transport_window_id,
+ const base::Optional<gfx::Rect>& mask) {
ServerWindow* window =
GetWindowByClientId(ClientWindowId(transport_window_id));
if (!window || !access_policy_->CanSetHitTestMask(window)) {
@@ -1374,8 +1375,8 @@ void WindowTree::SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) {
return;
}
- if (!mask.IsEmpty())
- window->SetHitTestMask(mask);
+ if (mask)
+ window->SetHitTestMask(*mask);
else
window->ClearHitTestMask();
}
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | skia/public/interfaces/skbitmap.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698