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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) { | 161 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) { |
162 connection->AddInterface<Gpu>(this); | 162 connection->AddInterface<Gpu>(this); |
163 connection->AddInterface<mojom::DisplayManager>(this); | 163 connection->AddInterface<mojom::DisplayManager>(this); |
164 connection->AddInterface<mojom::UserAccessManager>(this); | 164 connection->AddInterface<mojom::UserAccessManager>(this); |
165 connection->AddInterface<WindowTreeHostFactory>(this); | 165 connection->AddInterface<WindowTreeHostFactory>(this); |
166 connection->AddInterface<mojom::WindowManagerFactoryService>(this); | 166 connection->AddInterface<mojom::WindowManagerFactoryService>(this); |
167 connection->AddInterface<mojom::WindowTreeFactory>(this); | 167 connection->AddInterface<mojom::WindowTreeFactory>(this); |
168 return true; | 168 return true; |
169 } | 169 } |
170 | 170 |
| 171 void MandolineUIServicesApp::ShellConnectionLost() { |
| 172 // TODO: This should exit cleanly. |
| 173 _exit(1); |
| 174 } |
| 175 |
171 void MandolineUIServicesApp::OnFirstDisplayReady() { | 176 void MandolineUIServicesApp::OnFirstDisplayReady() { |
172 PendingRequests requests; | 177 PendingRequests requests; |
173 requests.swap(pending_requests_); | 178 requests.swap(pending_requests_); |
174 for (auto& request : requests) | 179 for (auto& request : requests) |
175 Create(request->connection, std::move(*request->wtf_request)); | 180 Create(request->connection, std::move(*request->wtf_request)); |
176 } | 181 } |
177 | 182 |
178 void MandolineUIServicesApp::OnNoMoreDisplays() { | 183 void MandolineUIServicesApp::OnNoMoreDisplays() { |
179 base::MessageLoop::current()->QuitWhenIdle(); | 184 base::MessageLoop::current()->QuitWhenIdle(); |
180 } | 185 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 user_state->window_tree_host_factory->AddBinding(std::move(request)); | 254 user_state->window_tree_host_factory->AddBinding(std::move(request)); |
250 } | 255 } |
251 | 256 |
252 void MandolineUIServicesApp::Create(mojo::Connection* connection, | 257 void MandolineUIServicesApp::Create(mojo::Connection* connection, |
253 mojom::GpuRequest request) { | 258 mojom::GpuRequest request) { |
254 DCHECK(platform_display_init_params_.gpu_state); | 259 DCHECK(platform_display_init_params_.gpu_state); |
255 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); | 260 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); |
256 } | 261 } |
257 | 262 |
258 } // namespace mus | 263 } // namespace mus |
OLD | NEW |