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

Unified Diff: media/mojo/services/mojo_cdm_service_context.cc

Issue 1230313010: media: Add ServiceFactory mojo interface and implementation. (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_context.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_context.cc
diff --git a/media/mojo/services/mojo_cdm_service_context.cc b/media/mojo/services/mojo_cdm_service_context.cc
index 5431cf3d5396903ec56029a8136ca7cc3ac5e2a6..297d5831af29a97b0bbc1f05acaee98d23fb1c2e 100644
--- a/media/mojo/services/mojo_cdm_service_context.cc
+++ b/media/mojo/services/mojo_cdm_service_context.cc
@@ -6,15 +6,19 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "media/mojo/services/mojo_cdm_service.h"
namespace media {
-MojoCdmServiceContext::MojoCdmServiceContext() {
-}
+MojoCdmServiceContext::MojoCdmServiceContext() : weak_ptr_factory_(this) {}
MojoCdmServiceContext::~MojoCdmServiceContext() {
}
+base::WeakPtr<MojoCdmServiceContext> MojoCdmServiceContext::GetWeakPtr() {
+ return weak_ptr_factory_.GetWeakPtr();
+}
+
void MojoCdmServiceContext::RegisterCdm(int cdm_id,
MojoCdmService* cdm_service) {
DCHECK(!cdm_services_.count(cdm_id));
« no previous file with comments | « media/mojo/services/mojo_cdm_service_context.h ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698