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

Side by Side Diff: components/mus/ws/window_tree_impl.cc

Issue 1584053002: mus: Fix closing windows created after the first window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/mus/ws/window_tree_impl.h" 5 #include "components/mus/ws/window_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 void WindowTreeImpl::WmRequestClose(Id transport_window_id) { 1116 void WindowTreeImpl::WmRequestClose(Id transport_window_id) {
1117 // Only the WindowManager should be using this. 1117 // Only the WindowManager should be using this.
1118 WindowTreeHostImpl* host = GetHostForWindowManager(); 1118 WindowTreeHostImpl* host = GetHostForWindowManager();
1119 if (!host) 1119 if (!host)
1120 return; 1120 return;
1121 1121
1122 ServerWindow* window = GetWindow(MapWindowIdFromClient(transport_window_id)); 1122 ServerWindow* window = GetWindow(MapWindowIdFromClient(transport_window_id));
1123 WindowTreeImpl* connection = 1123 WindowTreeImpl* connection =
1124 connection_manager_->GetConnectionWithRoot(window); 1124 connection_manager_->GetConnectionWithRoot(window);
1125 if (connection && connection != host->GetWindowTree()) 1125 if (connection && connection != host->GetWindowTree())
1126 connection->client_->RequestClose(MapWindowIdToClient(window)); 1126 connection->client_->RequestClose(connection->MapWindowIdToClient(window));
1127 // TODO(sky): think about what else case means. 1127 // TODO(sky): think about what else case means.
1128 } 1128 }
1129 1129
1130 void WindowTreeImpl::OnWmCreatedTopLevelWindow(uint32_t change_id, 1130 void WindowTreeImpl::OnWmCreatedTopLevelWindow(uint32_t change_id,
1131 Id transport_window_id) { 1131 Id transport_window_id) {
1132 if (GetHostForWindowManager()) { 1132 if (GetHostForWindowManager()) {
1133 connection_manager_->WindowManagerCreatedTopLevelWindow( 1133 connection_manager_->WindowManagerCreatedTopLevelWindow(
1134 this, change_id, transport_window_id); 1134 this, change_id, transport_window_id);
1135 } 1135 }
1136 // TODO(sky): think about what else case means. 1136 // TODO(sky): think about what else case means.
(...skipping 21 matching lines...) Expand all
1158 1158
1159 for (const auto* root : roots_) { 1159 for (const auto* root : roots_) {
1160 if (root->Contains(window)) 1160 if (root->Contains(window))
1161 return true; 1161 return true;
1162 } 1162 }
1163 return false; 1163 return false;
1164 } 1164 }
1165 1165
1166 } // namespace ws 1166 } // namespace ws
1167 } // namespace mus 1167 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698