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

Side by Side Diff: services/ui/ws/default_access_policy.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/default_access_policy.h ('k') | services/ui/ws/server_window.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/default_access_policy.h" 5 #include "services/ui/ws/default_access_policy.h"
6 6
7 #include "services/ui/ws/access_policy_delegate.h" 7 #include "services/ui/ws/access_policy_delegate.h"
8 #include "services/ui/ws/server_window.h" 8 #include "services/ui/ws/server_window.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const { 142 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const {
143 return WasCreatedByThisClient(window) || 143 return WasCreatedByThisClient(window) ||
144 delegate_->HasRootForAccessPolicy(window); 144 delegate_->HasRootForAccessPolicy(window);
145 } 145 }
146 146
147 bool DefaultAccessPolicy::CanSetHitTestMask(const ServerWindow* window) const { 147 bool DefaultAccessPolicy::CanSetHitTestMask(const ServerWindow* window) const {
148 return WasCreatedByThisClient(window) || 148 return WasCreatedByThisClient(window) ||
149 delegate_->HasRootForAccessPolicy(window); 149 delegate_->HasRootForAccessPolicy(window);
150 } 150 }
151 151
152 bool DefaultAccessPolicy::CanSetAcceptEvents(const ServerWindow* window) const {
153 return WasCreatedByThisClient(window) ||
154 delegate_->HasRootForAccessPolicy(window);
155 }
156
152 bool DefaultAccessPolicy::CanSetCursorProperties( 157 bool DefaultAccessPolicy::CanSetCursorProperties(
153 const ServerWindow* window) const { 158 const ServerWindow* window) const {
154 return WasCreatedByThisClient(window) || 159 return WasCreatedByThisClient(window) ||
155 delegate_->HasRootForAccessPolicy(window); 160 delegate_->HasRootForAccessPolicy(window);
156 } 161 }
157 162
158 bool DefaultAccessPolicy::CanInitiateMoveLoop( 163 bool DefaultAccessPolicy::CanInitiateMoveLoop(
159 const ServerWindow* window) const { 164 const ServerWindow* window) const {
160 return delegate_->HasRootForAccessPolicy(window); 165 return delegate_->HasRootForAccessPolicy(window);
161 } 166 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool DefaultAccessPolicy::IsValidIdForNewWindow( 204 bool DefaultAccessPolicy::IsValidIdForNewWindow(
200 const ClientWindowId& id) const { 205 const ClientWindowId& id) const {
201 // Clients using DefaultAccessPolicy only see windows they have created (for 206 // Clients using DefaultAccessPolicy only see windows they have created (for
202 // the embed point they choose the id), so it's ok for clients to use whatever 207 // the embed point they choose the id), so it's ok for clients to use whatever
203 // id they want. 208 // id they want.
204 return true; 209 return true;
205 } 210 }
206 211
207 } // namespace ws 212 } // namespace ws
208 } // namespace ui 213 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/default_access_policy.h ('k') | services/ui/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698