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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 return WasCreatedByThisClient(window) || | 133 return WasCreatedByThisClient(window) || |
134 delegate_->HasRootForAccessPolicy(window); | 134 delegate_->HasRootForAccessPolicy(window); |
135 } | 135 } |
136 | 136 |
137 bool WindowManagerAccessPolicy::CanSetCursorProperties( | 137 bool WindowManagerAccessPolicy::CanSetCursorProperties( |
138 const ServerWindow* window) const { | 138 const ServerWindow* window) const { |
139 return WasCreatedByThisClient(window) || | 139 return WasCreatedByThisClient(window) || |
140 delegate_->HasRootForAccessPolicy(window); | 140 delegate_->HasRootForAccessPolicy(window); |
141 } | 141 } |
142 | 142 |
| 143 bool WindowManagerAccessPolicy::CanInitiateMoveLoop( |
| 144 const ServerWindow* window) const { |
| 145 return false; |
| 146 } |
| 147 |
143 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange( | 148 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange( |
144 const ServerWindow* window, | 149 const ServerWindow* window, |
145 const ServerWindow** new_parent, | 150 const ServerWindow** new_parent, |
146 const ServerWindow** old_parent) const { | 151 const ServerWindow** old_parent) const { |
147 // Notify if we've already told the window manager about the window, or if | 152 // Notify if we've already told the window manager about the window, or if |
148 // we've | 153 // we've |
149 // already told the window manager about the parent. The later handles the | 154 // already told the window manager about the parent. The later handles the |
150 // case of a window that wasn't parented to the root getting added to the | 155 // case of a window that wasn't parented to the root getting added to the |
151 // root. | 156 // root. |
152 return IsWindowKnown(window) || (*new_parent && IsWindowKnown(*new_parent)); | 157 return IsWindowKnown(window) || (*new_parent && IsWindowKnown(*new_parent)); |
(...skipping 22 matching lines...) Expand all Loading... |
175 return WindowIdFromTransportId(id.id).client_id == client_id_; | 180 return WindowIdFromTransportId(id.id).client_id == client_id_; |
176 } | 181 } |
177 | 182 |
178 bool WindowManagerAccessPolicy::WasCreatedByThisClient( | 183 bool WindowManagerAccessPolicy::WasCreatedByThisClient( |
179 const ServerWindow* window) const { | 184 const ServerWindow* window) const { |
180 return window->id().client_id == client_id_; | 185 return window->id().client_id == client_id_; |
181 } | 186 } |
182 | 187 |
183 } // namespace ws | 188 } // namespace ws |
184 } // namespace ui | 189 } // namespace ui |
OLD | NEW |