| 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 return; | 1119 return; |
| 1120 | 1120 |
| 1121 ServerWindow* window = GetWindow(MapWindowIdFromClient(transport_window_id)); | 1121 ServerWindow* window = GetWindow(MapWindowIdFromClient(transport_window_id)); |
| 1122 WindowTreeImpl* connection = | 1122 WindowTreeImpl* connection = |
| 1123 connection_manager_->GetConnectionWithRoot(window); | 1123 connection_manager_->GetConnectionWithRoot(window); |
| 1124 if (connection && connection != host->GetWindowTree()) | 1124 if (connection && connection != host->GetWindowTree()) |
| 1125 connection->client_->RequestClose(connection->MapWindowIdToClient(window)); | 1125 connection->client_->RequestClose(connection->MapWindowIdToClient(window)); |
| 1126 // TODO(sky): think about what else case means. | 1126 // TODO(sky): think about what else case means. |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 void WindowTreeImpl::WmSetFrameDecorationValues( |
| 1130 mojom::FrameDecorationValuesPtr values) { |
| 1131 if (GetHostForWindowManager()) |
| 1132 GetHostForWindowManager()->SetFrameDecorationValues(std::move(values)); |
| 1133 } |
| 1134 |
| 1129 void WindowTreeImpl::OnWmCreatedTopLevelWindow(uint32_t change_id, | 1135 void WindowTreeImpl::OnWmCreatedTopLevelWindow(uint32_t change_id, |
| 1130 Id transport_window_id) { | 1136 Id transport_window_id) { |
| 1131 if (GetHostForWindowManager()) { | 1137 if (GetHostForWindowManager()) { |
| 1132 connection_manager_->WindowManagerCreatedTopLevelWindow( | 1138 connection_manager_->WindowManagerCreatedTopLevelWindow( |
| 1133 this, change_id, transport_window_id); | 1139 this, change_id, transport_window_id); |
| 1134 } | 1140 } |
| 1135 // TODO(sky): think about what else case means. | 1141 // TODO(sky): think about what else case means. |
| 1136 } | 1142 } |
| 1137 | 1143 |
| 1138 bool WindowTreeImpl::HasRootForAccessPolicy(const ServerWindow* window) const { | 1144 bool WindowTreeImpl::HasRootForAccessPolicy(const ServerWindow* window) const { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1157 | 1163 |
| 1158 for (const auto* root : roots_) { | 1164 for (const auto* root : roots_) { |
| 1159 if (root->Contains(window)) | 1165 if (root->Contains(window)) |
| 1160 return true; | 1166 return true; |
| 1161 } | 1167 } |
| 1162 return false; | 1168 return false; |
| 1163 } | 1169 } |
| 1164 | 1170 |
| 1165 } // namespace ws | 1171 } // namespace ws |
| 1166 } // namespace mus | 1172 } // namespace mus |
| OLD | NEW |