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 "components/mus/ws/default_access_policy.h" | 5 #include "components/mus/ws/default_access_policy.h" |
6 | 6 |
7 #include "components/mus/ws/access_policy_delegate.h" | 7 #include "components/mus/ws/access_policy_delegate.h" |
8 #include "components/mus/ws/server_window.h" | 8 #include "components/mus/ws/server_window.h" |
9 | 9 |
10 namespace mus { | 10 namespace mus { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const { | 126 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const { |
127 return WasCreatedByThisConnection(window) || | 127 return WasCreatedByThisConnection(window) || |
128 delegate_->IsRootForAccessPolicy(window->id()); | 128 delegate_->IsRootForAccessPolicy(window->id()); |
129 } | 129 } |
130 | 130 |
131 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const { | 131 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const { |
132 return WasCreatedByThisConnection(window) || | 132 return WasCreatedByThisConnection(window) || |
133 delegate_->IsRootForAccessPolicy(window->id()); | 133 delegate_->IsRootForAccessPolicy(window->id()); |
134 } | 134 } |
135 | 135 |
| 136 bool DefaultAccessPolicy::CanSetCursorProperties( |
| 137 const ServerWindow* window) const { |
| 138 return WasCreatedByThisConnection(window) || |
| 139 delegate_->IsRootForAccessPolicy(window->id()); |
| 140 } |
| 141 |
136 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange( | 142 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange( |
137 const ServerWindow* window, | 143 const ServerWindow* window, |
138 const ServerWindow** new_parent, | 144 const ServerWindow** new_parent, |
139 const ServerWindow** old_parent) const { | 145 const ServerWindow** old_parent) const { |
140 if (!WasCreatedByThisConnection(window) && !IsDescendantOfEmbedRoot(window) && | 146 if (!WasCreatedByThisConnection(window) && !IsDescendantOfEmbedRoot(window) && |
141 (!*new_parent || !IsDescendantOfEmbedRoot(*new_parent)) && | 147 (!*new_parent || !IsDescendantOfEmbedRoot(*new_parent)) && |
142 (!*old_parent || !IsDescendantOfEmbedRoot(*old_parent))) { | 148 (!*old_parent || !IsDescendantOfEmbedRoot(*old_parent))) { |
143 return false; | 149 return false; |
144 } | 150 } |
145 | 151 |
(...skipping 25 matching lines...) Expand all Loading... |
171 } | 177 } |
172 | 178 |
173 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( | 179 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( |
174 const ServerWindow* window) const { | 180 const ServerWindow* window) const { |
175 return delegate_->IsDescendantOfEmbedRoot(window); | 181 return delegate_->IsDescendantOfEmbedRoot(window); |
176 } | 182 } |
177 | 183 |
178 } // namespace ws | 184 } // namespace ws |
179 | 185 |
180 } // namespace mus | 186 } // namespace mus |
OLD | NEW |