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

Unified Diff: mojo/application/public/cpp/lib/application_impl.cc

Issue 1200323003: media: Quit MojoMediaApplication when no service is bound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/application/public/cpp/lib/app_lifetime_helper.cc ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/public/cpp/lib/application_impl.cc
diff --git a/mojo/application/public/cpp/lib/application_impl.cc b/mojo/application/public/cpp/lib/application_impl.cc
index f1c6e42c6015935f9724c90519cf9858463e8289..5a203688100f69651c933140768a6142857fc7e3 100644
--- a/mojo/application/public/cpp/lib/application_impl.cc
+++ b/mojo/application/public/cpp/lib/application_impl.cc
@@ -65,6 +65,12 @@ ApplicationImpl::~ApplicationImpl() {
ApplicationConnection* ApplicationImpl::ConnectToApplication(
mojo::URLRequestPtr request) {
+ return ConnectToApplication(request.Pass(), base::Bind(&base::DoNothing));
+}
+
+ApplicationConnection* ApplicationImpl::ConnectToApplication(
+ mojo::URLRequestPtr request,
+ const base::Closure& terminate_cb) {
if (!shell_)
return nullptr;
ServiceProviderPtr local_services;
@@ -73,6 +79,7 @@ ApplicationConnection* ApplicationImpl::ConnectToApplication(
std::string application_url = request->url.To<std::string>();
shell_->ConnectToApplication(request.Pass(), GetProxy(&remote_services),
local_services.Pass());
+ remote_services.set_connection_error_handler(terminate_cb);
internal::ServiceRegistry* registry = new internal::ServiceRegistry(
this, application_url, application_url, remote_services.Pass(),
local_request.Pass());
« no previous file with comments | « mojo/application/public/cpp/lib/app_lifetime_helper.cc ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698