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

Side by Side Diff: services/ui/ws/window_manager_access_policy.cc

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stray mark Created 4 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 "services/ui/ws/window_manager_access_policy.h" 5 #include "services/ui/ws/window_manager_access_policy.h"
6 6
7 #include "services/ui/ws/access_policy_delegate.h" 7 #include "services/ui/ws/access_policy_delegate.h"
8 #include "services/ui/ws/server_window.h" 8 #include "services/ui/ws/server_window.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return WasCreatedByThisClient(window) || 131 return WasCreatedByThisClient(window) ||
132 delegate_->HasRootForAccessPolicy(window); 132 delegate_->HasRootForAccessPolicy(window);
133 } 133 }
134 134
135 bool WindowManagerAccessPolicy::CanSetHitTestMask( 135 bool WindowManagerAccessPolicy::CanSetHitTestMask(
136 const ServerWindow* window) const { 136 const ServerWindow* window) const {
137 return WasCreatedByThisClient(window) || 137 return WasCreatedByThisClient(window) ||
138 delegate_->HasRootForAccessPolicy(window); 138 delegate_->HasRootForAccessPolicy(window);
139 } 139 }
140 140
141 bool WindowManagerAccessPolicy::CanSetAcceptDrags(
142 const ServerWindow* window) const {
143 // Only the client associated with a window may set this.
sky 2016/09/06 21:11:27 Are you sure you don't want WasCreatedByThisClient
144 return false;
145 }
146
141 bool WindowManagerAccessPolicy::CanSetAcceptEvents( 147 bool WindowManagerAccessPolicy::CanSetAcceptEvents(
142 const ServerWindow* window) const { 148 const ServerWindow* window) const {
143 return WasCreatedByThisClient(window) || 149 return WasCreatedByThisClient(window) ||
144 delegate_->HasRootForAccessPolicy(window); 150 delegate_->HasRootForAccessPolicy(window);
145 } 151 }
146 152
147 bool WindowManagerAccessPolicy::CanSetCursorProperties( 153 bool WindowManagerAccessPolicy::CanSetCursorProperties(
148 const ServerWindow* window) const { 154 const ServerWindow* window) const {
149 return WasCreatedByThisClient(window) || 155 return WasCreatedByThisClient(window) ||
150 delegate_->HasRootForAccessPolicy(window); 156 delegate_->HasRootForAccessPolicy(window);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return WindowIdFromTransportId(id.id).client_id == client_id_; 196 return WindowIdFromTransportId(id.id).client_id == client_id_;
191 } 197 }
192 198
193 bool WindowManagerAccessPolicy::WasCreatedByThisClient( 199 bool WindowManagerAccessPolicy::WasCreatedByThisClient(
194 const ServerWindow* window) const { 200 const ServerWindow* window) const {
195 return window->id().client_id == client_id_; 201 return window->id().client_id == client_id_;
196 } 202 }
197 203
198 } // namespace ws 204 } // namespace ws
199 } // namespace ui 205 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698