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

Side by Side 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, 4 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
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | skia/public/interfaces/skbitmap.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 ServerWindow* window = 1359 ServerWindow* window =
1360 GetWindowByClientId(ClientWindowId(transport_window_id)); 1360 GetWindowByClientId(ClientWindowId(transport_window_id));
1361 if (!window || !access_policy_->CanSetClientArea(window)) 1361 if (!window || !access_policy_->CanSetClientArea(window))
1362 return; 1362 return;
1363 1363
1364 std::vector<gfx::Rect> additional_client_areas = 1364 std::vector<gfx::Rect> additional_client_areas =
1365 transport_additional_client_areas.To<std::vector<gfx::Rect>>(); 1365 transport_additional_client_areas.To<std::vector<gfx::Rect>>();
1366 window->SetClientArea(insets, additional_client_areas); 1366 window->SetClientArea(insets, additional_client_areas);
1367 } 1367 }
1368 1368
1369 void WindowTree::SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) { 1369 void WindowTree::SetHitTestMask(Id transport_window_id,
1370 const base::Optional<gfx::Rect>& mask) {
1370 ServerWindow* window = 1371 ServerWindow* window =
1371 GetWindowByClientId(ClientWindowId(transport_window_id)); 1372 GetWindowByClientId(ClientWindowId(transport_window_id));
1372 if (!window || !access_policy_->CanSetHitTestMask(window)) { 1373 if (!window || !access_policy_->CanSetHitTestMask(window)) {
1373 DVLOG(1) << "SetHitTestMask failed"; 1374 DVLOG(1) << "SetHitTestMask failed";
1374 return; 1375 return;
1375 } 1376 }
1376 1377
1377 if (!mask.IsEmpty()) 1378 if (mask)
1378 window->SetHitTestMask(mask); 1379 window->SetHitTestMask(*mask);
1379 else 1380 else
1380 window->ClearHitTestMask(); 1381 window->ClearHitTestMask();
1381 } 1382 }
1382 1383
1383 void WindowTree::Embed(Id transport_window_id, 1384 void WindowTree::Embed(Id transport_window_id,
1384 mojom::WindowTreeClientPtr client, 1385 mojom::WindowTreeClientPtr client,
1385 uint32_t flags, 1386 uint32_t flags,
1386 const EmbedCallback& callback) { 1387 const EmbedCallback& callback) {
1387 callback.Run( 1388 callback.Run(
1388 Embed(ClientWindowId(transport_window_id), std::move(client), flags)); 1389 Embed(ClientWindowId(transport_window_id), std::move(client), flags));
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 } 1670 }
1670 1671
1671 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1672 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1672 const ServerWindow* window) const { 1673 const ServerWindow* window) const {
1673 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1674 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1674 return tree && tree != this; 1675 return tree && tree != this;
1675 } 1676 }
1676 1677
1677 } // namespace ws 1678 } // namespace ws
1678 } // namespace ui 1679 } // namespace ui
OLDNEW
« 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