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

Unified Diff: services/ui/ws/window_tree.cc

Issue 2500973002: Converts test_wm to use aura (Closed)
Patch Set: feedback Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/test_wm/test_wm.cc ('k') | ui/aura/mus/in_flight_change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 9b6459540c5dd71d5ca6405db13a846b15f02e70..f90e316ccec6ea02aa24048bf8267a78c9d69903 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -307,6 +307,9 @@ bool WindowTree::AddTransientWindow(const ClientWindowId& window_id,
bool WindowTree::DeleteWindow(const ClientWindowId& window_id) {
ServerWindow* window = GetWindowByClientId(window_id);
+ DVLOG(3) << "removing window from parent client=" << id_
+ << " local window_id= " << window_id.id << " local window_id="
msw 2016/11/17 22:27:27 Are both really local? Is the 2nd global? (ditto b
sky 2016/11/18 00:56:24 Oopsie.
+ << (window ? WindowIdToTransportId(window->id()) : 0);
if (!window)
return false;
@@ -1195,8 +1198,16 @@ void WindowTree::AddWindow(uint32_t change_id, Id parent_id, Id child_id) {
void WindowTree::RemoveWindowFromParent(uint32_t change_id, Id window_id) {
bool success = false;
ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id));
- if (window && window->parent() &&
- access_policy_->CanRemoveWindowFromParent(window)) {
+ DVLOG(3) << "removing window from parent client=" << id_
+ << " local window_id= " << window_id << " local window_id="
+ << (window ? WindowIdToTransportId(window->id()) : 0);
+ if (!window) {
+ DVLOG(1) << "remove failing, invalid window id=" << change_id;
+ } else if (!window->parent()) {
+ DVLOG(1) << "remove failing, no parent id=" << change_id;
+ } else if (access_policy_->CanRemoveWindowFromParent(window)) {
+ DVLOG(1) << "remove failing, access policy disallowed id=" << change_id;
+ } else {
success = true;
Operation op(this, window_server_,
OperationType::REMOVE_WINDOW_FROM_PARENT);
« no previous file with comments | « services/ui/test_wm/test_wm.cc ('k') | ui/aura/mus/in_flight_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698