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

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

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/mus/ws/default_access_policy.h" 5 #include "components/mus/ws/default_access_policy.h"
6 6
7 #include "components/mus/ws/access_policy_delegate.h" 7 #include "components/mus/ws/access_policy_delegate.h"
8 #include "components/mus/ws/server_window.h" 8 #include "components/mus/ws/server_window.h"
9 9
10 namespace mus { 10 namespace mus {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const { 137 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const {
138 return !window || WasCreatedByThisConnection(window) || 138 return !window || WasCreatedByThisConnection(window) ||
139 delegate_->HasRootForAccessPolicy(window); 139 delegate_->HasRootForAccessPolicy(window);
140 } 140 }
141 141
142 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const { 142 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const {
143 return WasCreatedByThisConnection(window) || 143 return WasCreatedByThisConnection(window) ||
144 delegate_->HasRootForAccessPolicy(window); 144 delegate_->HasRootForAccessPolicy(window);
145 } 145 }
146 146
147 bool DefaultAccessPolicy::CanSetHitTestMask(const ServerWindow* window) const {
148 return WasCreatedByThisConnection(window) ||
149 delegate_->HasRootForAccessPolicy(window);
150 }
151
147 bool DefaultAccessPolicy::CanSetCursorProperties( 152 bool DefaultAccessPolicy::CanSetCursorProperties(
148 const ServerWindow* window) const { 153 const ServerWindow* window) const {
149 return WasCreatedByThisConnection(window) || 154 return WasCreatedByThisConnection(window) ||
150 delegate_->HasRootForAccessPolicy(window); 155 delegate_->HasRootForAccessPolicy(window);
151 } 156 }
152 157
153 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange( 158 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange(
154 const ServerWindow* window, 159 const ServerWindow* window,
155 const ServerWindow** new_parent, 160 const ServerWindow** new_parent,
156 const ServerWindow** old_parent) const { 161 const ServerWindow** old_parent) const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 bool DefaultAccessPolicy::IsValidIdForNewWindow( 194 bool DefaultAccessPolicy::IsValidIdForNewWindow(
190 const ClientWindowId& id) const { 195 const ClientWindowId& id) const {
191 // Clients using DefaultAccessPolicy only see windows they have created (for 196 // Clients using DefaultAccessPolicy only see windows they have created (for
192 // the embed point they choose the id), so it's ok for clients to use whatever 197 // the embed point they choose the id), so it's ok for clients to use whatever
193 // id they want. 198 // id they want.
194 return true; 199 return true;
195 } 200 }
196 201
197 } // namespace ws 202 } // namespace ws
198 } // namespace mus 203 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/default_access_policy.h ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698