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

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

Issue 1448303002: media: Add static MojoCdmService::GetCdm(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 c669a74b73b9fd3d4f14da7f374ae8b5164c7e6b..2e5f077daa89081cf4dd6c13bdc65574db33e5b9 100644
--- a/media/mojo/services/mojo_cdm_service.h
+++ b/media/mojo/services/mojo_cdm_service.h
@@ -25,6 +25,16 @@ class CdmFactory;
// media::MediaKeys.
class MojoCdmService : public interfaces::ContentDecryptionModule {
public:
+ // Get the CDM associated with |cdm_id|, which is unique per process.
+ // Can be called on any thread. The returned CDM may be used on a different
+ // thread only when it is safe to do so.
+ // Note: This provides a generic hack to get the CDM in the process where
+ // MojoMeidaApplication is running, regardless of which render process or
+ // render frame the caller is associated with. In the future, we should move
+ // all out-of-process media players into the MojoMediaApplicaiton so that we
+ // can use MojoCdmServiceContext (per render frame) to get the CDM.
+ static scoped_refptr<MediaKeys> GetCdm(int cdm_id);
+
// Constructs a MojoCdmService and strongly binds it to the |request|.
MojoCdmService(
base::WeakPtr<MojoCdmServiceContext> context,

Powered by Google App Engine
This is Rietveld 408576698