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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 const ServerWindow* DefaultAccessPolicy::GetWindowForFocusChange( | 166 const ServerWindow* DefaultAccessPolicy::GetWindowForFocusChange( |
167 const ServerWindow* focused) { | 167 const ServerWindow* focused) { |
168 if (WasCreatedByThisConnection(focused) || | 168 if (WasCreatedByThisConnection(focused) || |
169 delegate_->HasRootForAccessPolicy(focused)) | 169 delegate_->HasRootForAccessPolicy(focused)) |
170 return focused; | 170 return focused; |
171 return nullptr; | 171 return nullptr; |
172 } | 172 } |
173 | 173 |
174 bool DefaultAccessPolicy::CanSetWindowManagerInternal() const { | 174 bool DefaultAccessPolicy::CanSetWindowManager() const { |
175 return false; | 175 return false; |
176 } | 176 } |
177 | 177 |
178 bool DefaultAccessPolicy::WasCreatedByThisConnection( | 178 bool DefaultAccessPolicy::WasCreatedByThisConnection( |
179 const ServerWindow* window) const { | 179 const ServerWindow* window) const { |
180 return window->id().connection_id == connection_id_; | 180 return window->id().connection_id == connection_id_; |
181 } | 181 } |
182 | 182 |
183 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( | 183 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( |
184 const ServerWindow* window) const { | 184 const ServerWindow* window) const { |
185 return delegate_->IsDescendantOfEmbedRoot(window); | 185 return delegate_->IsDescendantOfEmbedRoot(window); |
186 } | 186 } |
187 | 187 |
188 } // namespace ws | 188 } // namespace ws |
189 | 189 |
190 } // namespace mus | 190 } // namespace mus |
OLD | NEW |