| 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/public/cpp/lib/window_tree_client_impl.h" | 5 #include "components/mus/public/cpp/lib/window_tree_client_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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 417 } |
| 418 | 418 |
| 419 void WindowTreeClientImpl::OnEmbedImpl(mojom::WindowTree* window_tree, | 419 void WindowTreeClientImpl::OnEmbedImpl(mojom::WindowTree* window_tree, |
| 420 ConnectionSpecificId connection_id, | 420 ConnectionSpecificId connection_id, |
| 421 mojom::WindowDataPtr root_data, | 421 mojom::WindowDataPtr root_data, |
| 422 Id focused_window_id, | 422 Id focused_window_id, |
| 423 uint32_t access_policy) { | 423 uint32_t access_policy) { |
| 424 tree_ = window_tree; | 424 tree_ = window_tree; |
| 425 connection_id_ = connection_id; | 425 connection_id_ = connection_id; |
| 426 is_embed_root_ = | 426 is_embed_root_ = |
| 427 (access_policy & mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT) != 0; | 427 (access_policy & mojom::WindowTree::kAccessPolicyEmbedRoot) != 0; |
| 428 | 428 |
| 429 DCHECK(roots_.empty()); | 429 DCHECK(roots_.empty()); |
| 430 Window* root = AddWindowToConnection(this, nullptr, root_data); | 430 Window* root = AddWindowToConnection(this, nullptr, root_data); |
| 431 roots_.insert(root); | 431 roots_.insert(root); |
| 432 | 432 |
| 433 focused_window_ = GetWindowById(focused_window_id); | 433 focused_window_ = GetWindowById(focused_window_id); |
| 434 | 434 |
| 435 delegate_->OnEmbed(root); | 435 delegate_->OnEmbed(root); |
| 436 | 436 |
| 437 if (focused_window_) { | 437 if (focused_window_) { |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { | 856 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { |
| 857 std::map<std::string, std::vector<uint8_t>> properties = | 857 std::map<std::string, std::vector<uint8_t>> properties = |
| 858 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); | 858 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); |
| 859 Window* window = | 859 Window* window = |
| 860 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties); | 860 window_manager_delegate_->OnWmCreateTopLevelWindow(&properties); |
| 861 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id, | 861 window_manager_internal_client_->OnWmCreatedTopLevelWindow(change_id, |
| 862 window->id()); | 862 window->id()); |
| 863 } | 863 } |
| 864 | 864 |
| 865 } // namespace mus | 865 } // namespace mus |
| OLD | NEW |