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

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 'window &&' 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);
151 } 156 }
152 157
158 bool WindowManagerAccessPolicy::CanInitiateDragLoop(
159 const ServerWindow* window) const {
160 return false;
sky 2016/09/15 18:10:47 If you return here it means the windowmanager can'
161 }
162
153 bool WindowManagerAccessPolicy::CanInitiateMoveLoop( 163 bool WindowManagerAccessPolicy::CanInitiateMoveLoop(
154 const ServerWindow* window) const { 164 const ServerWindow* window) const {
155 return false; 165 return false;
156 } 166 }
157 167
158 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange( 168 bool WindowManagerAccessPolicy::ShouldNotifyOnHierarchyChange(
159 const ServerWindow* window, 169 const ServerWindow* window,
160 const ServerWindow** new_parent, 170 const ServerWindow** new_parent,
161 const ServerWindow** old_parent) const { 171 const ServerWindow** old_parent) const {
162 // Notify if we've already told the window manager about the window, or if 172 // Notify if we've already told the window manager about the window, or if
(...skipping 27 matching lines...) Expand all
190 return WindowIdFromTransportId(id.id).client_id == client_id_; 200 return WindowIdFromTransportId(id.id).client_id == client_id_;
191 } 201 }
192 202
193 bool WindowManagerAccessPolicy::WasCreatedByThisClient( 203 bool WindowManagerAccessPolicy::WasCreatedByThisClient(
194 const ServerWindow* window) const { 204 const ServerWindow* window) const {
195 return window->id().client_id == client_id_; 205 return window->id().client_id == client_id_;
196 } 206 }
197 207
198 } // namespace ws 208 } // namespace ws
199 } // namespace ui 209 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698