OLD | NEW |
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_manager_access_policy.h" | 5 #include "services/ui/ws/window_manager_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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 return WasCreatedByThisClient(window) || | 127 return WasCreatedByThisClient(window) || |
128 delegate_->HasRootForAccessPolicy(window); | 128 delegate_->HasRootForAccessPolicy(window); |
129 } | 129 } |
130 | 130 |
131 bool WindowManagerAccessPolicy::CanSetHitTestMask( | 131 bool WindowManagerAccessPolicy::CanSetHitTestMask( |
132 const ServerWindow* window) const { | 132 const ServerWindow* window) const { |
133 return WasCreatedByThisClient(window) || | 133 return WasCreatedByThisClient(window) || |
134 delegate_->HasRootForAccessPolicy(window); | 134 delegate_->HasRootForAccessPolicy(window); |
135 } | 135 } |
136 | 136 |
| 137 bool WindowManagerAccessPolicy::CanSetAcceptDrags( |
| 138 const ServerWindow* window) const { |
| 139 // Only the client associated with a window may set this. |
| 140 return false; |
| 141 } |
| 142 |
137 bool WindowManagerAccessPolicy::CanSetAcceptEvents( | 143 bool WindowManagerAccessPolicy::CanSetAcceptEvents( |
138 const ServerWindow* window) const { | 144 const ServerWindow* window) const { |
139 return WasCreatedByThisClient(window) || | 145 return WasCreatedByThisClient(window) || |
140 delegate_->HasRootForAccessPolicy(window); | 146 delegate_->HasRootForAccessPolicy(window); |
141 } | 147 } |
142 | 148 |
143 bool WindowManagerAccessPolicy::CanSetCursorProperties( | 149 bool WindowManagerAccessPolicy::CanSetCursorProperties( |
144 const ServerWindow* window) const { | 150 const ServerWindow* window) const { |
145 return WasCreatedByThisClient(window) || | 151 return WasCreatedByThisClient(window) || |
146 delegate_->HasRootForAccessPolicy(window); | 152 delegate_->HasRootForAccessPolicy(window); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 return WindowIdFromTransportId(id.id).client_id == client_id_; | 192 return WindowIdFromTransportId(id.id).client_id == client_id_; |
187 } | 193 } |
188 | 194 |
189 bool WindowManagerAccessPolicy::WasCreatedByThisClient( | 195 bool WindowManagerAccessPolicy::WasCreatedByThisClient( |
190 const ServerWindow* window) const { | 196 const ServerWindow* window) const { |
191 return window->id().client_id == client_id_; | 197 return window->id().client_id == client_id_; |
192 } | 198 } |
193 | 199 |
194 } // namespace ws | 200 } // namespace ws |
195 } // namespace ui | 201 } // namespace ui |
OLD | NEW |