| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 scoped_ptr<WaitingForTopLevelWindowInfo> waiting_for_top_level_window_info( | 265 scoped_ptr<WaitingForTopLevelWindowInfo> waiting_for_top_level_window_info( |
| 266 std::move(waiting_for_top_level_window_info_)); | 266 std::move(waiting_for_top_level_window_info_)); |
| 267 connection_manager_->GetClientConnection(this) | 267 connection_manager_->GetClientConnection(this) |
| 268 ->SetIncomingMethodCallProcessingPaused(false); | 268 ->SetIncomingMethodCallProcessingPaused(false); |
| 269 embed_to_real_id_map_[waiting_for_top_level_window_info->window_id] = | 269 embed_to_real_id_map_[waiting_for_top_level_window_info->window_id] = |
| 270 window_id; | 270 window_id; |
| 271 std::vector<const ServerWindow*> unused; | 271 std::vector<const ServerWindow*> unused; |
| 272 const ServerWindow* window = GetWindow(window_id); | 272 const ServerWindow* window = GetWindow(window_id); |
| 273 roots_.insert(window); | 273 roots_.insert(window); |
| 274 GetUnknownWindowsFrom(window, &unused); | 274 GetUnknownWindowsFrom(window, &unused); |
| 275 client_->OnChangeCompleted(client_change_id, true); | 275 client_->OnTopLevelCreated(client_change_id, WindowToWindowData(window)); |
| 276 } | 276 } |
| 277 | 277 |
| 278 WindowId WindowTreeImpl::MapWindowIdFromClient(const WindowId& id) const { | 278 WindowId WindowTreeImpl::MapWindowIdFromClient(const WindowId& id) const { |
| 279 auto iter = embed_to_real_id_map_.find(id); | 279 auto iter = embed_to_real_id_map_.find(id); |
| 280 return iter == embed_to_real_id_map_.end() ? id : iter->second; | 280 return iter == embed_to_real_id_map_.end() ? id : iter->second; |
| 281 } | 281 } |
| 282 | 282 |
| 283 Id WindowTreeImpl::MapWindowIdToClient(const ServerWindow* window) const { | 283 Id WindowTreeImpl::MapWindowIdToClient(const ServerWindow* window) const { |
| 284 return MapWindowIdToClient(window ? window->id() : WindowId()); | 284 return MapWindowIdToClient(window ? window->id() : WindowId()); |
| 285 } | 285 } |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 | 1151 |
| 1152 for (const auto* root : roots_) { | 1152 for (const auto* root : roots_) { |
| 1153 if (root->Contains(window)) | 1153 if (root->Contains(window)) |
| 1154 return true; | 1154 return true; |
| 1155 } | 1155 } |
| 1156 return false; | 1156 return false; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 } // namespace ws | 1159 } // namespace ws |
| 1160 } // namespace mus | 1160 } // namespace mus |
| OLD | NEW |