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

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

Issue 2633233003: aura-mus: Implement stacking in DesktopWindowTreeHostMus. (Closed)
Patch Set: Reword comment. Created 3 years, 11 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/window_manager_access_policy.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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return (WasCreatedByThisClient(window) && 149 return (WasCreatedByThisClient(window) &&
150 !delegate_->IsWindowRootOfAnotherTreeForAccessPolicy(window)) || 150 !delegate_->IsWindowRootOfAnotherTreeForAccessPolicy(window)) ||
151 delegate_->HasRootForAccessPolicy(window); 151 delegate_->HasRootForAccessPolicy(window);
152 } 152 }
153 153
154 bool DefaultAccessPolicy::CanSetAcceptEvents(const ServerWindow* window) const { 154 bool DefaultAccessPolicy::CanSetAcceptEvents(const ServerWindow* window) const {
155 return WasCreatedByThisClient(window) || 155 return WasCreatedByThisClient(window) ||
156 delegate_->HasRootForAccessPolicy(window); 156 delegate_->HasRootForAccessPolicy(window);
157 } 157 }
158 158
159 bool DefaultAccessPolicy::CanStackAtTop(const ServerWindow* window) const {
160 return delegate_->HasRootForAccessPolicy(window) &&
161 delegate_->IsWindowCreatedByWindowManager(window);
162 }
163
159 bool DefaultAccessPolicy::CanSetCursorProperties( 164 bool DefaultAccessPolicy::CanSetCursorProperties(
160 const ServerWindow* window) const { 165 const ServerWindow* window) const {
161 return WasCreatedByThisClient(window) || 166 return WasCreatedByThisClient(window) ||
162 delegate_->HasRootForAccessPolicy(window); 167 delegate_->HasRootForAccessPolicy(window);
163 } 168 }
164 169
165 bool DefaultAccessPolicy::CanInitiateDragLoop( 170 bool DefaultAccessPolicy::CanInitiateDragLoop(
166 const ServerWindow* window) const { 171 const ServerWindow* window) const {
167 return WasCreatedByThisClient(window) || 172 return WasCreatedByThisClient(window) ||
168 delegate_->HasRootForAccessPolicy(window); 173 delegate_->HasRootForAccessPolicy(window);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool DefaultAccessPolicy::IsValidIdForNewWindow( 217 bool DefaultAccessPolicy::IsValidIdForNewWindow(
213 const ClientWindowId& id) const { 218 const ClientWindowId& id) const {
214 // Clients using DefaultAccessPolicy only see windows they have created (for 219 // Clients using DefaultAccessPolicy only see windows they have created (for
215 // the embed point they choose the id), so it's ok for clients to use whatever 220 // the embed point they choose the id), so it's ok for clients to use whatever
216 // id they want. 221 // id they want.
217 return true; 222 return true;
218 } 223 }
219 224
220 } // namespace ws 225 } // namespace ws
221 } // namespace ui 226 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/default_access_policy.h ('k') | services/ui/ws/window_manager_access_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698