OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |