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

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

Issue 2118383002: mus: Disregard windows that explicitly set can_accept_events to be false when sending events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check if can_accept_events setting has changed; change names Created 4 years, 5 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::CanSetAcceptEvents(
138 const ServerWindow* window) const {
139 return WasCreatedByThisClient(window) ||
140 delegate_->HasRootForAccessPolicy(window);
141 }
142
137 bool WindowManagerAccessPolicy::CanSetCursorProperties( 143 bool WindowManagerAccessPolicy::CanSetCursorProperties(
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::CanInitiateMoveLoop( 149 bool WindowManagerAccessPolicy::CanInitiateMoveLoop(
144 const ServerWindow* window) const { 150 const ServerWindow* window) const {
145 return false; 151 return false;
146 } 152 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return WindowIdFromTransportId(id.id).client_id == client_id_; 186 return WindowIdFromTransportId(id.id).client_id == client_id_;
181 } 187 }
182 188
183 bool WindowManagerAccessPolicy::WasCreatedByThisClient( 189 bool WindowManagerAccessPolicy::WasCreatedByThisClient(
184 const ServerWindow* window) const { 190 const ServerWindow* window) const {
185 return window->id().client_id == client_id_; 191 return window->id().client_id == client_id_;
186 } 192 }
187 193
188 } // namespace ws 194 } // namespace ws
189 } // namespace ui 195 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698