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

Side by Side Diff: components/view_manager/window_manager_access_policy.cc

Issue 1138073007: Nukes the windowmanager interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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
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/view_manager/window_manager_access_policy.h" 5 #include "components/view_manager/window_manager_access_policy.h"
6 6
7 #include "components/view_manager/access_policy_delegate.h" 7 #include "components/view_manager/access_policy_delegate.h"
8 #include "components/view_manager/server_view.h" 8 #include "components/view_manager/server_view.h"
9 9
10 namespace view_manager { 10 namespace view_manager {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const ServerView* view) const { 50 const ServerView* view) const {
51 return view->id() != ClonedViewId(); 51 return view->id() != ClonedViewId();
52 } 52 }
53 53
54 bool WindowManagerAccessPolicy::CanEmbed(const ServerView* view) const { 54 bool WindowManagerAccessPolicy::CanEmbed(const ServerView* view) const {
55 return view->id().connection_id == connection_id_; 55 return view->id().connection_id == connection_id_;
56 } 56 }
57 57
58 bool WindowManagerAccessPolicy::CanChangeViewVisibility( 58 bool WindowManagerAccessPolicy::CanChangeViewVisibility(
59 const ServerView* view) const { 59 const ServerView* view) const {
60 return view->id().connection_id == connection_id_; 60 // The WindowManager can change the visibility of the root too.
61 return view->id().connection_id == connection_id_ ||
62 view->id() == RootViewId();
61 } 63 }
62 64
63 bool WindowManagerAccessPolicy::CanSetViewSurfaceId( 65 bool WindowManagerAccessPolicy::CanSetViewSurfaceId(
64 const ServerView* view) const { 66 const ServerView* view) const {
65 if (delegate_->IsViewRootOfAnotherConnectionForAccessPolicy(view)) 67 if (delegate_->IsViewRootOfAnotherConnectionForAccessPolicy(view))
66 return false; 68 return false;
67 return view->id().connection_id == connection_id_ || 69 return view->id().connection_id == connection_id_ ||
68 (delegate_->IsRootForAccessPolicy(view->id())); 70 (delegate_->IsRootForAccessPolicy(view->id()));
69 } 71 }
70 72
(...skipping 26 matching lines...) Expand all
97 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange( 99 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange(
98 const ServerView* focused) { 100 const ServerView* focused) {
99 return focused; 101 return focused;
100 } 102 }
101 103
102 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const { 104 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const {
103 return delegate_->IsViewKnownForAccessPolicy(view); 105 return delegate_->IsViewKnownForAccessPolicy(view);
104 } 106 }
105 107
106 } // namespace view_manager 108 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/view_manager/view_manager_service_unittest.cc ('k') | components/window_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698