| 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 "mojo/services/view_manager/window_manager_access_policy.h" | 5 #include "services/view_manager/window_manager_access_policy.h" |
| 6 | 6 |
| 7 #include "mojo/services/view_manager/access_policy_delegate.h" | 7 #include "services/view_manager/access_policy_delegate.h" |
| 8 #include "mojo/services/view_manager/server_view.h" | 8 #include "services/view_manager/server_view.h" |
| 9 | 9 |
| 10 namespace mojo { | 10 namespace mojo { |
| 11 namespace service { | 11 namespace service { |
| 12 | 12 |
| 13 // TODO(sky): document why this differs from default for each case. Maybe want | 13 // TODO(sky): document why this differs from default for each case. Maybe want |
| 14 // to subclass DefaultAccessPolicy. | 14 // to subclass DefaultAccessPolicy. |
| 15 | 15 |
| 16 WindowManagerAccessPolicy::WindowManagerAccessPolicy( | 16 WindowManagerAccessPolicy::WindowManagerAccessPolicy( |
| 17 ConnectionSpecificId connection_id, | 17 ConnectionSpecificId connection_id, |
| 18 AccessPolicyDelegate* delegate) | 18 AccessPolicyDelegate* delegate) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // case of a view that wasn't parented to the root getting added to the root. | 90 // case of a view that wasn't parented to the root getting added to the root. |
| 91 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent)); | 91 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const { | 94 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const { |
| 95 return delegate_->IsViewKnownForAccessPolicy(view); | 95 return delegate_->IsViewKnownForAccessPolicy(view); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace service | 98 } // namespace service |
| 99 } // namespace mojo | 99 } // namespace mojo |
| OLD | NEW |