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

Unified Diff: media/mojo/services/mojo_cdm_service.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 | « media/mojo/services/mojo_cdm_service.h ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm_service.cc
diff --git a/media/mojo/services/mojo_cdm_service.cc b/media/mojo/services/mojo_cdm_service.cc
index 25f325547874cab57238fca9e5340410963173b3..d00097aa12cb2cde1c44eaa199b211b4d28c8c53 100644
--- a/media/mojo/services/mojo_cdm_service.cc
+++ b/media/mojo/services/mojo_cdm_service.cc
@@ -11,6 +11,7 @@
#include "media/mojo/services/media_type_converters.h"
#include "media/mojo/services/mojo_cdm_promise.h"
#include "media/mojo/services/mojo_cdm_service_context.h"
+#include "mojo/application/public/cpp/app_lifetime_helper.h"
#include "mojo/common/common_type_converters.h"
#include "mojo/common/url_type_converters.h"
#include "url/gurl.h"
@@ -21,15 +22,19 @@ typedef MojoCdmPromise<> SimpleMojoCdmPromise;
typedef MojoCdmPromise<std::string> NewSessionMojoCdmPromise;
MojoCdmService::MojoCdmService(
+ mojo::InterfaceRequest<mojo::ContentDecryptionModule> request,
MojoCdmServiceContext* context,
- mojo::InterfaceRequest<mojo::ContentDecryptionModule> request)
+ scoped_ptr<mojo::AppRefCount> parent_app_refcount)
: binding_(this, request.Pass()),
context_(context),
+ parent_app_refcount_(parent_app_refcount.Pass()),
cdm_id_(CdmContext::kInvalidCdmId),
weak_factory_(this) {
+ DVLOG(1) << __FUNCTION__;
}
MojoCdmService::~MojoCdmService() {
+ DVLOG(1) << __FUNCTION__;
if (cdm_id_ != CdmContext::kInvalidCdmId)
context_->UnregisterCdm(cdm_id_);
}
« no previous file with comments | « media/mojo/services/mojo_cdm_service.h ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698