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/mus_app.h" | 5 #include "components/mus/mus_app.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "components/mus/common/args.h" | 9 #include "components/mus/common/args.h" |
10 #include "components/mus/gles2/gpu_impl.h" | 10 #include "components/mus/gles2/gpu_impl.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 void MandolineUIServicesApp::OnNoMoreRootConnections() { | 93 void MandolineUIServicesApp::OnNoMoreRootConnections() { |
94 app_impl_->Quit(); | 94 app_impl_->Quit(); |
95 } | 95 } |
96 | 96 |
97 ws::ClientConnection* | 97 ws::ClientConnection* |
98 MandolineUIServicesApp::CreateClientConnectionForEmbedAtWindow( | 98 MandolineUIServicesApp::CreateClientConnectionForEmbedAtWindow( |
99 ws::ConnectionManager* connection_manager, | 99 ws::ConnectionManager* connection_manager, |
100 mojo::InterfaceRequest<mojom::WindowTree> tree_request, | 100 mojo::InterfaceRequest<mojom::WindowTree> tree_request, |
101 ConnectionSpecificId creator_id, | |
102 const ws::WindowId& root_id, | 101 const ws::WindowId& root_id, |
103 uint32_t policy_bitmask, | 102 uint32_t policy_bitmask, |
104 mojom::WindowTreeClientPtr client) { | 103 mojom::WindowTreeClientPtr client) { |
105 scoped_ptr<ws::WindowTreeImpl> service(new ws::WindowTreeImpl( | 104 scoped_ptr<ws::WindowTreeImpl> service( |
106 connection_manager, creator_id, root_id, policy_bitmask)); | 105 new ws::WindowTreeImpl(connection_manager, root_id, policy_bitmask)); |
107 return new ws::DefaultClientConnection(std::move(service), connection_manager, | 106 return new ws::DefaultClientConnection(std::move(service), connection_manager, |
108 std::move(tree_request), | 107 std::move(tree_request), |
109 std::move(client)); | 108 std::move(client)); |
110 } | 109 } |
111 | 110 |
112 void MandolineUIServicesApp::Create( | 111 void MandolineUIServicesApp::Create( |
113 mojo::ApplicationConnection* connection, | 112 mojo::ApplicationConnection* connection, |
114 mojo::InterfaceRequest<mojom::WindowManager> request) { | 113 mojo::InterfaceRequest<mojom::WindowManager> request) { |
115 if (!connection_manager_->has_tree_host_connections()) { | 114 if (!connection_manager_->has_tree_host_connections()) { |
116 pending_window_manager_requests_.push_back(make_scoped_ptr( | 115 pending_window_manager_requests_.push_back(make_scoped_ptr( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 std::move(host_client), connection_manager_.get(), app_impl_, gpu_state_, | 149 std::move(host_client), connection_manager_.get(), app_impl_, gpu_state_, |
151 surfaces_state_, std::move(window_manager)); | 150 surfaces_state_, std::move(window_manager)); |
152 | 151 |
153 // WindowTreeHostConnection manages its own lifetime. | 152 // WindowTreeHostConnection manages its own lifetime. |
154 host_impl->Init(new ws::WindowTreeHostConnectionImpl( | 153 host_impl->Init(new ws::WindowTreeHostConnectionImpl( |
155 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), | 154 std::move(host), make_scoped_ptr(host_impl), std::move(tree_client), |
156 connection_manager_.get())); | 155 connection_manager_.get())); |
157 } | 156 } |
158 | 157 |
159 } // namespace mus | 158 } // namespace mus |
OLD | NEW |