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

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

Issue 1352043005: mus: Implement Window Server Capture Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test 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/mus/window_manager_access_policy.h" 5 #include "components/mus/window_manager_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 mus {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 bool WindowManagerAccessPolicy::CanSetViewProperties( 76 bool WindowManagerAccessPolicy::CanSetViewProperties(
77 const ServerView* view) const { 77 const ServerView* view) const {
78 return view->id().connection_id == connection_id_; 78 return view->id().connection_id == connection_id_;
79 } 79 }
80 80
81 bool WindowManagerAccessPolicy::CanSetViewTextInputState( 81 bool WindowManagerAccessPolicy::CanSetViewTextInputState(
82 const ServerView* view) const { 82 const ServerView* view) const {
83 return view->id().connection_id == connection_id_; 83 return view->id().connection_id == connection_id_;
84 } 84 }
85 85
86 bool WindowManagerAccessPolicy::CanSetCapture(const ServerView* view) const {
87 return true;
88 }
89
86 bool WindowManagerAccessPolicy::CanSetFocus(const ServerView* view) const { 90 bool WindowManagerAccessPolicy::CanSetFocus(const ServerView* view) const {
87 return true; 91 return true;
88 } 92 }
89 93
90 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange( 94 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange(
91 const ServerView* view, 95 const ServerView* view,
92 const ServerView** new_parent, 96 const ServerView** new_parent,
93 const ServerView** old_parent) const { 97 const ServerView** old_parent) const {
94 // Notify if we've already told the window manager about the view, or if we've 98 // Notify if we've already told the window manager about the view, or if we've
95 // already told the window manager about the parent. The later handles the 99 // already told the window manager about the parent. The later handles the
96 // case of a view that wasn't parented to the root getting added to the root. 100 // case of a view that wasn't parented to the root getting added to the root.
97 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent)); 101 return IsViewKnown(view) || (*new_parent && IsViewKnown(*new_parent));
98 } 102 }
99 103
100 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange( 104 const ServerView* WindowManagerAccessPolicy::GetViewForFocusChange(
101 const ServerView* focused) { 105 const ServerView* focused) {
102 return focused; 106 return focused;
103 } 107 }
104 108
105 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const { 109 bool WindowManagerAccessPolicy::IsViewKnown(const ServerView* view) const {
106 return delegate_->IsViewKnownForAccessPolicy(view); 110 return delegate_->IsViewKnownForAccessPolicy(view);
107 } 111 }
108 112
109 } // namespace mus 113 } // namespace mus
OLDNEW
« components/mus/view_tree_apptest.cc ('K') | « components/mus/window_manager_access_policy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698