| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 const ServerWindow* window) const { | 129 const ServerWindow* window) const { |
| 130 return WasCreatedByThisClient(window) || | 130 return WasCreatedByThisClient(window) || |
| 131 delegate_->HasRootForAccessPolicy(window); | 131 delegate_->HasRootForAccessPolicy(window); |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool WindowManagerAccessPolicy::CanSetAcceptDrops( | 134 bool WindowManagerAccessPolicy::CanSetAcceptDrops( |
| 135 const ServerWindow* window) const { | 135 const ServerWindow* window) const { |
| 136 return true; | 136 return true; |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool WindowManagerAccessPolicy::CanSetAcceptEvents( | 139 bool WindowManagerAccessPolicy::CanSetEventTargetingPolicy( |
| 140 const ServerWindow* window) const { | 140 const ServerWindow* window) const { |
| 141 return WasCreatedByThisClient(window) || | 141 return WasCreatedByThisClient(window) || |
| 142 delegate_->HasRootForAccessPolicy(window); | 142 delegate_->HasRootForAccessPolicy(window); |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool WindowManagerAccessPolicy::CanStackAbove( | 145 bool WindowManagerAccessPolicy::CanStackAbove( |
| 146 const ServerWindow* above, | 146 const ServerWindow* above, |
| 147 const ServerWindow* below) const { | 147 const ServerWindow* below) const { |
| 148 // This API is for clients. Window managers can perform any arbitrary | 148 // This API is for clients. Window managers can perform any arbitrary |
| 149 // reordering of the windows and don't need to go through this constrained | 149 // reordering of the windows and don't need to go through this constrained |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 return WindowIdFromTransportId(id.id).client_id == client_id_; | 211 return WindowIdFromTransportId(id.id).client_id == client_id_; |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool WindowManagerAccessPolicy::WasCreatedByThisClient( | 214 bool WindowManagerAccessPolicy::WasCreatedByThisClient( |
| 215 const ServerWindow* window) const { | 215 const ServerWindow* window) const { |
| 216 return window->id().client_id == client_id_; | 216 return window->id().client_id == client_id_; |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace ws | 219 } // namespace ws |
| 220 } // namespace ui | 220 } // namespace ui |
| OLD | NEW |