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

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

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do it the other way + explicit checks that it is a mouse pointer. Created 5 years 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/ws/default_access_policy.h ('k') | components/mus/ws/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/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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const { 126 bool DefaultAccessPolicy::CanSetFocus(const ServerWindow* window) const {
127 return WasCreatedByThisConnection(window) || 127 return WasCreatedByThisConnection(window) ||
128 delegate_->IsRootForAccessPolicy(window->id()); 128 delegate_->IsRootForAccessPolicy(window->id());
129 } 129 }
130 130
131 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const { 131 bool DefaultAccessPolicy::CanSetClientArea(const ServerWindow* window) const {
132 return WasCreatedByThisConnection(window) || 132 return WasCreatedByThisConnection(window) ||
133 delegate_->IsRootForAccessPolicy(window->id()); 133 delegate_->IsRootForAccessPolicy(window->id());
134 } 134 }
135 135
136 bool DefaultAccessPolicy::CanSetCursorProperties(
137 const ServerWindow* window) const {
138 return WasCreatedByThisConnection(window) ||
139 delegate_->IsRootForAccessPolicy(window->id());
140 }
141
136 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange( 142 bool DefaultAccessPolicy::ShouldNotifyOnHierarchyChange(
137 const ServerWindow* window, 143 const ServerWindow* window,
138 const ServerWindow** new_parent, 144 const ServerWindow** new_parent,
139 const ServerWindow** old_parent) const { 145 const ServerWindow** old_parent) const {
140 if (!WasCreatedByThisConnection(window) && !IsDescendantOfEmbedRoot(window) && 146 if (!WasCreatedByThisConnection(window) && !IsDescendantOfEmbedRoot(window) &&
141 (!*new_parent || !IsDescendantOfEmbedRoot(*new_parent)) && 147 (!*new_parent || !IsDescendantOfEmbedRoot(*new_parent)) &&
142 (!*old_parent || !IsDescendantOfEmbedRoot(*old_parent))) { 148 (!*old_parent || !IsDescendantOfEmbedRoot(*old_parent))) {
143 return false; 149 return false;
144 } 150 }
145 151
(...skipping 25 matching lines...) Expand all
171 } 177 }
172 178
173 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot( 179 bool DefaultAccessPolicy::IsDescendantOfEmbedRoot(
174 const ServerWindow* window) const { 180 const ServerWindow* window) const {
175 return delegate_->IsDescendantOfEmbedRoot(window); 181 return delegate_->IsDescendantOfEmbedRoot(window);
176 } 182 }
177 183
178 } // namespace ws 184 } // namespace ws
179 185
180 } // namespace mus 186 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/default_access_policy.h ('k') | components/mus/ws/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698