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

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: sky comments 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::CanSetAcceptDrops(
142 const ServerWindow* window) const {
143 return true;
144 }
145
141 bool WindowManagerAccessPolicy::CanSetAcceptEvents( 146 bool WindowManagerAccessPolicy::CanSetAcceptEvents(
142 const ServerWindow* window) const { 147 const ServerWindow* window) const {
143 return WasCreatedByThisClient(window) || 148 return WasCreatedByThisClient(window) ||
144 delegate_->HasRootForAccessPolicy(window); 149 delegate_->HasRootForAccessPolicy(window);
145 } 150 }
146 151
147 bool WindowManagerAccessPolicy::CanSetCursorProperties( 152 bool WindowManagerAccessPolicy::CanSetCursorProperties(
148 const ServerWindow* window) const { 153 const ServerWindow* window) const {
149 return WasCreatedByThisClient(window) || 154 return WasCreatedByThisClient(window) ||
150 delegate_->HasRootForAccessPolicy(window); 155 delegate_->HasRootForAccessPolicy(window);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return WindowIdFromTransportId(id.id).client_id == client_id_; 195 return WindowIdFromTransportId(id.id).client_id == client_id_;
191 } 196 }
192 197
193 bool WindowManagerAccessPolicy::WasCreatedByThisClient( 198 bool WindowManagerAccessPolicy::WasCreatedByThisClient(
194 const ServerWindow* window) const { 199 const ServerWindow* window) const {
195 return window->id().client_id == client_id_; 200 return window->id().client_id == client_id_;
196 } 201 }
197 202
198 } // namespace ws 203 } // namespace ws
199 } // namespace ui 204 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698