Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Side by Side Diff: components/mus/mus_app.cc

Issue 1819063002: Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and update resourceproviderunittest Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/mus_app.h ('k') | components/resource_provider/resource_provider_app.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) { 164 bool MandolineUIServicesApp::AcceptConnection(Connection* connection) {
165 connection->AddInterface<Gpu>(this); 165 connection->AddInterface<Gpu>(this);
166 connection->AddInterface<mojom::DisplayManager>(this); 166 connection->AddInterface<mojom::DisplayManager>(this);
167 connection->AddInterface<mojom::UserAccessManager>(this); 167 connection->AddInterface<mojom::UserAccessManager>(this);
168 connection->AddInterface<WindowTreeHostFactory>(this); 168 connection->AddInterface<WindowTreeHostFactory>(this);
169 connection->AddInterface<mojom::WindowManagerFactoryService>(this); 169 connection->AddInterface<mojom::WindowManagerFactoryService>(this);
170 connection->AddInterface<mojom::WindowTreeFactory>(this); 170 connection->AddInterface<mojom::WindowTreeFactory>(this);
171 return true; 171 return true;
172 } 172 }
173 173
174 void MandolineUIServicesApp::ShellConnectionLost() {
175 // TODO: This should exit cleanly.
176 _exit(1);
177 }
178
179 void MandolineUIServicesApp::OnFirstDisplayReady() { 174 void MandolineUIServicesApp::OnFirstDisplayReady() {
180 PendingRequests requests; 175 PendingRequests requests;
181 requests.swap(pending_requests_); 176 requests.swap(pending_requests_);
182 for (auto& request : requests) 177 for (auto& request : requests)
183 Create(request->connection, std::move(*request->wtf_request)); 178 Create(request->connection, std::move(*request->wtf_request));
184 } 179 }
185 180
186 void MandolineUIServicesApp::OnNoMoreDisplays() { 181 void MandolineUIServicesApp::OnNoMoreDisplays() {
187 // We may get here from the destructor, in which case there is no messageloop. 182 // We may get here from the destructor, in which case there is no messageloop.
188 if (base::MessageLoop::current()) 183 if (base::MessageLoop::current())
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 user_state->window_tree_host_factory->AddBinding(std::move(request)); 254 user_state->window_tree_host_factory->AddBinding(std::move(request));
260 } 255 }
261 256
262 void MandolineUIServicesApp::Create(mojo::Connection* connection, 257 void MandolineUIServicesApp::Create(mojo::Connection* connection,
263 mojom::GpuRequest request) { 258 mojom::GpuRequest request) {
264 DCHECK(platform_display_init_params_.gpu_state); 259 DCHECK(platform_display_init_params_.gpu_state);
265 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); 260 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state);
266 } 261 }
267 262
268 } // namespace mus 263 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/mus_app.h ('k') | components/resource_provider/resource_provider_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698