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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2535753009: Couple of changes for client area (Closed)
Patch Set: nuke todo Created 4 years 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/operation.h ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('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 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 DispatchInputEventImpl(target, *event); 1455 DispatchInputEventImpl(target, *event);
1456 } 1456 }
1457 } 1457 }
1458 1458
1459 void WindowTree::SetClientArea(Id transport_window_id, 1459 void WindowTree::SetClientArea(Id transport_window_id,
1460 const gfx::Insets& insets, 1460 const gfx::Insets& insets,
1461 const base::Optional<std::vector<gfx::Rect>>& 1461 const base::Optional<std::vector<gfx::Rect>>&
1462 transport_additional_client_areas) { 1462 transport_additional_client_areas) {
1463 ServerWindow* window = 1463 ServerWindow* window =
1464 GetWindowByClientId(ClientWindowId(transport_window_id)); 1464 GetWindowByClientId(ClientWindowId(transport_window_id));
1465 if (!window || !access_policy_->CanSetClientArea(window)) 1465 DVLOG(3) << "SetClientArea client window_id=" << transport_window_id
1466 << " global window_id="
1467 << (window ? WindowIdToTransportId(window->id()) : 0)
1468 << " insets=" << insets.top() << " " << insets.left() << " "
1469 << insets.bottom() << " " << insets.right();
1470 if (!window) {
1471 DVLOG(1) << "SetClientArea failed, no window";
1466 return; 1472 return;
1473 }
1474 if (!access_policy_->CanSetClientArea(window)) {
1475 DVLOG(1) << "SetClientArea failed, access denied";
1476 return;
1477 }
1467 1478
1479 Operation op(this, window_server_, OperationType::SET_CLIENT_AREA);
1468 window->SetClientArea(insets, transport_additional_client_areas.value_or( 1480 window->SetClientArea(insets, transport_additional_client_areas.value_or(
1469 std::vector<gfx::Rect>())); 1481 std::vector<gfx::Rect>()));
1470 } 1482 }
1471 1483
1472 void WindowTree::SetHitTestMask(Id transport_window_id, 1484 void WindowTree::SetHitTestMask(Id transport_window_id,
1473 const base::Optional<gfx::Rect>& mask) { 1485 const base::Optional<gfx::Rect>& mask) {
1474 ServerWindow* window = 1486 ServerWindow* window =
1475 GetWindowByClientId(ClientWindowId(transport_window_id)); 1487 GetWindowByClientId(ClientWindowId(transport_window_id));
1476 if (!window || !access_policy_->CanSetHitTestMask(window)) { 1488 if (!window || !access_policy_->CanSetHitTestMask(window)) {
1477 DVLOG(1) << "SetHitTestMask failed"; 1489 DVLOG(1) << "SetHitTestMask failed";
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 1977 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
1966 effect_bitmask, callback); 1978 effect_bitmask, callback);
1967 } 1979 }
1968 1980
1969 void WindowTree::PerformOnDragDropDone() { 1981 void WindowTree::PerformOnDragDropDone() {
1970 client()->OnDragDropDone(); 1982 client()->OnDragDropDone();
1971 } 1983 }
1972 1984
1973 } // namespace ws 1985 } // namespace ws
1974 } // namespace ui 1986 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/operation.h ('k') | ui/views/mus/desktop_window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698