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

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

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_unittest.cc » ('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 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 1377
1378 void WindowTree::SetCanFocus(Id transport_window_id, bool can_focus) { 1378 void WindowTree::SetCanFocus(Id transport_window_id, bool can_focus) {
1379 ServerWindow* window = 1379 ServerWindow* window =
1380 GetWindowByClientId(ClientWindowId(transport_window_id)); 1380 GetWindowByClientId(ClientWindowId(transport_window_id));
1381 // TODO(sky): there should be an else case (it shouldn't route to wm and 1381 // TODO(sky): there should be an else case (it shouldn't route to wm and
1382 // policy allows, then set_can_focus). 1382 // policy allows, then set_can_focus).
1383 if (window && ShouldRouteToWindowManager(window)) 1383 if (window && ShouldRouteToWindowManager(window))
1384 window->set_can_focus(can_focus); 1384 window->set_can_focus(can_focus);
1385 } 1385 }
1386 1386
1387 void WindowTree::SetCanAcceptEvents(Id transport_window_id,
1388 bool can_accept_events) {
1389 ServerWindow* window =
1390 GetWindowByClientId(ClientWindowId(transport_window_id));
1391 // TODO(riajiang): check |event_queue_| is empty for |window|.
1392 if (window && access_policy_->CanSetAcceptEvents(window))
1393 window->set_can_accept_events(can_accept_events);
1394 }
1395
1387 void WindowTree::SetPredefinedCursor(uint32_t change_id, 1396 void WindowTree::SetPredefinedCursor(uint32_t change_id,
1388 Id transport_window_id, 1397 Id transport_window_id,
1389 ui::mojom::Cursor cursor_id) { 1398 ui::mojom::Cursor cursor_id) {
1390 ServerWindow* window = 1399 ServerWindow* window =
1391 GetWindowByClientId(ClientWindowId(transport_window_id)); 1400 GetWindowByClientId(ClientWindowId(transport_window_id));
1392 1401
1393 // Only the owner of the window can change the bounds. 1402 // Only the owner of the window can change the bounds.
1394 bool success = window && access_policy_->CanSetCursorProperties(window); 1403 bool success = window && access_policy_->CanSetCursorProperties(window);
1395 if (success) { 1404 if (success) {
1396 Operation op(this, window_server_, 1405 Operation op(this, window_server_,
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 } 1651 }
1643 1652
1644 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1653 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1645 const ServerWindow* window) const { 1654 const ServerWindow* window) const {
1646 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1655 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1647 return tree && tree != this; 1656 return tree && tree != this;
1648 } 1657 }
1649 1658
1650 } // namespace ws 1659 } // namespace ws
1651 } // namespace ui 1660 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698