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::CanSetAcceptEvents( |
| 138 const ServerWindow* window) const { |
| 139 return WasCreatedByThisClient(window) || |
| 140 delegate_->HasRootForAccessPolicy(window); |
| 141 } |
| 142 |
137 bool WindowManagerAccessPolicy::CanSetCursorProperties( | 143 bool WindowManagerAccessPolicy::CanSetCursorProperties( |
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::CanInitiateMoveLoop( | 149 bool WindowManagerAccessPolicy::CanInitiateMoveLoop( |
144 const ServerWindow* window) const { | 150 const ServerWindow* window) const { |
145 return false; | 151 return false; |
146 } | 152 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 return WindowIdFromTransportId(id.id).client_id == client_id_; | 186 return WindowIdFromTransportId(id.id).client_id == client_id_; |
181 } | 187 } |
182 | 188 |
183 bool WindowManagerAccessPolicy::WasCreatedByThisClient( | 189 bool WindowManagerAccessPolicy::WasCreatedByThisClient( |
184 const ServerWindow* window) const { | 190 const ServerWindow* window) const { |
185 return window->id().client_id == client_id_; | 191 return window->id().client_id == client_id_; |
186 } | 192 } |
187 | 193 |
188 } // namespace ws | 194 } // namespace ws |
189 } // namespace ui | 195 } // namespace ui |
OLD | NEW |