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

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

Issue 1317713006: Changes around how embed roots are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 bool WindowManagerAccessPolicy::CanSetViewTextInputState( 82 bool WindowManagerAccessPolicy::CanSetViewTextInputState(
83 const ServerView* view) const { 83 const ServerView* view) const {
84 return view->id().connection_id == connection_id_; 84 return view->id().connection_id == connection_id_;
85 } 85 }
86 86
87 bool WindowManagerAccessPolicy::CanSetFocus(const ServerView* view) const { 87 bool WindowManagerAccessPolicy::CanSetFocus(const ServerView* view) const {
88 return true; 88 return true;
89 } 89 }
90 90
91 bool WindowManagerAccessPolicy::CanSetAccessPolicy(
92 const ServerView* view) const {
93 return true;
94 }
95
91 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange( 96 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange(
92 const ServerView* view, 97 const ServerView* view,
93 const ServerView** new_parent, 98 const ServerView** new_parent,
94 const ServerView** old_parent) const { 99 const ServerView** old_parent) const {
95 // Notify if we've already told the window manager about the view, or if we've 100 // Notify if we've already told the window manager about the view, or if we've
96 // already told the window manager about the parent. The later handles the 101 // already told the window manager about the parent. The later handles the
97 // case of a view that wasn't parented to the root getting added to the root. 102 // case of a view that wasn't parented to the root getting added to the root.
98 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent)); 103 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent));
99 } 104 }
100 105
101 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange( 106 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange(
102 const ServerView* focused) { 107 const ServerView* focused) {
103 return focused; 108 return focused;
104 } 109 }
105 110
106 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const { 111 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const {
107 return delegate_->IsViewKnownForAccessPolicy(view); 112 return delegate_->IsViewKnownForAccessPolicy(view);
108 } 113 }
109 114
110 } // namespace view_manager 115 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/view_manager/window_manager_access_policy.h ('k') | components/web_view/web_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698