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

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: Uploaded for a few comments. Created 4 years, 4 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return WasCreatedByThisClient(window) || 127 return WasCreatedByThisClient(window) ||
128 delegate_->HasRootForAccessPolicy(window); 128 delegate_->HasRootForAccessPolicy(window);
129 } 129 }
130 130
131 bool WindowManagerAccessPolicy::CanSetHitTestMask( 131 bool WindowManagerAccessPolicy::CanSetHitTestMask(
132 const ServerWindow* window) const { 132 const ServerWindow* window) const {
133 return WasCreatedByThisClient(window) || 133 return WasCreatedByThisClient(window) ||
134 delegate_->HasRootForAccessPolicy(window); 134 delegate_->HasRootForAccessPolicy(window);
135 } 135 }
136 136
137 bool WindowManagerAccessPolicy::CanSetAcceptDrags(
138 const ServerWindow* window) const {
139 // Only the client associated with a window may set this.
140 return false;
141 }
142
137 bool WindowManagerAccessPolicy::CanSetAcceptEvents( 143 bool WindowManagerAccessPolicy::CanSetAcceptEvents(
138 const ServerWindow* window) const { 144 const ServerWindow* window) const {
139 return WasCreatedByThisClient(window) || 145 return WasCreatedByThisClient(window) ||
140 delegate_->HasRootForAccessPolicy(window); 146 delegate_->HasRootForAccessPolicy(window);
141 } 147 }
142 148
143 bool WindowManagerAccessPolicy::CanSetCursorProperties( 149 bool WindowManagerAccessPolicy::CanSetCursorProperties(
144 const ServerWindow* window) const { 150 const ServerWindow* window) const {
145 return WasCreatedByThisClient(window) || 151 return WasCreatedByThisClient(window) ||
146 delegate_->HasRootForAccessPolicy(window); 152 delegate_->HasRootForAccessPolicy(window);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return WindowIdFromTransportId(id.id).client_id == client_id_; 192 return WindowIdFromTransportId(id.id).client_id == client_id_;
187 } 193 }
188 194
189 bool WindowManagerAccessPolicy::WasCreatedByThisClient( 195 bool WindowManagerAccessPolicy::WasCreatedByThisClient(
190 const ServerWindow* window) const { 196 const ServerWindow* window) const {
191 return window->id().client_id == client_id_; 197 return window->id().client_id == client_id_;
192 } 198 }
193 199
194 } // namespace ws 200 } // namespace ws
195 } // namespace ui 201 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698