| 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 | |
| 176 void MandolineUIServicesApp::OnFirstDisplayReady() { | 171 void MandolineUIServicesApp::OnFirstDisplayReady() { |
| 177 PendingRequests requests; | 172 PendingRequests requests; |
| 178 requests.swap(pending_requests_); | 173 requests.swap(pending_requests_); |
| 179 for (auto& request : requests) | 174 for (auto& request : requests) |
| 180 Create(request->connection, std::move(*request->wtf_request)); | 175 Create(request->connection, std::move(*request->wtf_request)); |
| 181 } | 176 } |
| 182 | 177 |
| 183 void MandolineUIServicesApp::OnNoMoreDisplays() { | 178 void MandolineUIServicesApp::OnNoMoreDisplays() { |
| 184 base::MessageLoop::current()->QuitWhenIdle(); | 179 base::MessageLoop::current()->QuitWhenIdle(); |
| 185 } | 180 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 user_state->window_tree_host_factory->AddBinding(std::move(request)); | 249 user_state->window_tree_host_factory->AddBinding(std::move(request)); |
| 255 } | 250 } |
| 256 | 251 |
| 257 void MandolineUIServicesApp::Create(mojo::Connection* connection, | 252 void MandolineUIServicesApp::Create(mojo::Connection* connection, |
| 258 mojom::GpuRequest request) { | 253 mojom::GpuRequest request) { |
| 259 DCHECK(platform_display_init_params_.gpu_state); | 254 DCHECK(platform_display_init_params_.gpu_state); |
| 260 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); | 255 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); |
| 261 } | 256 } |
| 262 | 257 |
| 263 } // namespace mus | 258 } // namespace mus |
| OLD | NEW |