| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/mus/ws/display_binding.h" | |
| 6 | |
| 7 #include "base/memory/ptr_util.h" | |
| 8 #include "components/mus/ws/display.h" | |
| 9 #include "components/mus/ws/window_manager_access_policy.h" | |
| 10 #include "components/mus/ws/window_server.h" | |
| 11 #include "components/mus/ws/window_tree.h" | |
| 12 #include "services/shell/public/interfaces/connector.mojom.h" | |
| 13 | |
| 14 namespace mus { | |
| 15 namespace ws { | |
| 16 | |
| 17 DisplayBindingImpl::DisplayBindingImpl(mojom::WindowTreeHostRequest request, | |
| 18 Display* display, | |
| 19 const UserId& user_id, | |
| 20 mojom::WindowTreeClientPtr client, | |
| 21 WindowServer* window_server) | |
| 22 : window_server_(window_server), | |
| 23 user_id_(user_id), | |
| 24 binding_(display, std::move(request)), | |
| 25 client_(std::move(client)) {} | |
| 26 | |
| 27 DisplayBindingImpl::~DisplayBindingImpl() {} | |
| 28 | |
| 29 WindowTree* DisplayBindingImpl::CreateWindowTree(ServerWindow* root) { | |
| 30 const uint32_t embed_flags = 0; | |
| 31 WindowTree* tree = window_server_->EmbedAtWindow( | |
| 32 root, user_id_, std::move(client_), embed_flags, | |
| 33 base::WrapUnique(new WindowManagerAccessPolicy)); | |
| 34 tree->ConfigureWindowManager(); | |
| 35 return tree; | |
| 36 } | |
| 37 | |
| 38 } // namespace ws | |
| 39 } // namespace mus | |
| OLD | NEW |