Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: components/mus/default_access_policy.cc

Issue 1351013002: Revert of Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/default_access_policy.h ('k') | components/mus/display_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/default_access_policy.h" 5 #include "components/mus/default_access_policy.h"
6 6
7 #include "components/mus/access_policy_delegate.h" 7 #include "components/mus/access_policy_delegate.h"
8 #include "components/mus/server_view.h" 8 #include "components/mus/server_view.h"
9 9
10 namespace mus { 10 namespace view_manager {
11 11
12 DefaultAccessPolicy::DefaultAccessPolicy(ConnectionSpecificId connection_id, 12 DefaultAccessPolicy::DefaultAccessPolicy(
13 AccessPolicyDelegate* delegate) 13 mojo::ConnectionSpecificId connection_id,
14 AccessPolicyDelegate* delegate)
14 : connection_id_(connection_id), delegate_(delegate) {} 15 : connection_id_(connection_id), delegate_(delegate) {}
15 16
16 DefaultAccessPolicy::~DefaultAccessPolicy() {} 17 DefaultAccessPolicy::~DefaultAccessPolicy() {}
17 18
18 bool DefaultAccessPolicy::CanRemoveViewFromParent( 19 bool DefaultAccessPolicy::CanRemoveViewFromParent(
19 const ServerView* view) const { 20 const ServerView* view) const {
20 if (!WasCreatedByThisConnection(view)) 21 if (!WasCreatedByThisConnection(view))
21 return false; // Can only unparent views we created. 22 return false; // Can only unparent views we created.
22 23
23 return delegate_->IsRootForAccessPolicy(view->parent()->id()) || 24 return delegate_->IsRootForAccessPolicy(view->parent()->id()) ||
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool DefaultAccessPolicy::WasCreatedByThisConnection( 137 bool DefaultAccessPolicy::WasCreatedByThisConnection(
137 const ServerView* view) const { 138 const ServerView* view) const {
138 return view->id().connection_id == connection_id_; 139 return view->id().connection_id == connection_id_;
139 } 140 }
140 141
141 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( 142 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot(
142 const ServerView* view) const { 143 const ServerView* view) const {
143 return delegate_->IsDescendantOfEmbedRoot(view); 144 return delegate_->IsDescendantOfEmbedRoot(view);
144 } 145 }
145 146
146 } // namespace mus 147 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/mus/default_access_policy.h ('k') | components/mus/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698