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

Unified Diff: media/mojo/services/mojo_cdm_service.h

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_factory.cc ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm_service.h
diff --git a/media/mojo/services/mojo_cdm_service.h b/media/mojo/services/mojo_cdm_service.h
index de76880ac8065c1127cca1e6d1f273de2ef90118..a2424c8a1a8d9ba9ed3c461e31ad910f5dd86a9b 100644
--- a/media/mojo/services/mojo_cdm_service.h
+++ b/media/mojo/services/mojo_cdm_service.h
@@ -12,13 +12,13 @@
#include "media/base/media_keys.h"
#include "media/mojo/interfaces/content_decryption_module.mojom.h"
#include "media/mojo/services/mojo_cdm_promise.h"
+#include "media/mojo/services/mojo_cdm_service_context.h"
#include "mojo/application/public/interfaces/service_provider.mojom.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace media {
class CdmFactory;
-class MojoCdmServiceContext;
// A interfaces::ContentDecryptionModule implementation backed by a
// media::MediaKeys.
@@ -26,7 +26,7 @@ class MojoCdmService : public interfaces::ContentDecryptionModule {
public:
// Constructs a MojoCdmService and strongly binds it to the |request|.
MojoCdmService(
- MojoCdmServiceContext* context,
+ base::WeakPtr<MojoCdmServiceContext> context,
mojo::ServiceProvider* service_provider,
CdmFactory* cdm_factory,
mojo::InterfaceRequest<interfaces::ContentDecryptionModule> request);
@@ -98,7 +98,8 @@ class MojoCdmService : public interfaces::ContentDecryptionModule {
const std::string& error_message);
mojo::StrongBinding<interfaces::ContentDecryptionModule> binding_;
- MojoCdmServiceContext* context_;
+ base::WeakPtr<MojoCdmServiceContext> context_;
+
mojo::ServiceProvider* service_provider_;
CdmFactory* cdm_factory_;
scoped_ptr<MediaKeys> cdm_;
« no previous file with comments | « media/mojo/services/mojo_cdm_factory.cc ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698