Chromium Code Reviews| Index: media/base/cdm_context.h |
| diff --git a/media/base/cdm_context.h b/media/base/cdm_context.h |
| index b3e6a0b0ea0b270b9e436da9f5f22a2264ad5fd8..1263d66cd33b79b85030042cbba3a9e058273d49 100644 |
| --- a/media/base/cdm_context.h |
| +++ b/media/base/cdm_context.h |
| @@ -41,6 +41,26 @@ class MEDIA_EXPORT CdmContext { |
| DISALLOW_COPY_AND_ASSIGN(CdmContext); |
| }; |
| +// An interface that provides the access to a CdmContext through |cdm_id|. |
| +// This is typically used when CDMs are hosted remotely. |
| +class MEDIA_EXPORT CdmContextProvider { |
| + public: |
| + virtual ~CdmContextProvider(); |
| + |
| + // Returns the CdmContext corresponding to |cdm_id|. Returns nullptr if no |
| + // such CdmContext can be found. |
| + // Note: |cdm_id| is irrelevant to GetCdmId() of the returned CdmContext. |
|
ddorwin
2015/05/15 19:10:07
This is hard to understand. Perhaps they are not n
xhwang
2015/06/01 21:21:24
Updated comment with more restrictions.
|
| + // The former is used to locate the real CDM (the latter), which could just |
| + // be a local CDM that doesn't support a CDM ID. |
| + virtual CdmContext* GetCdmContext(int cdm_id) = 0; |
| + |
| + protected: |
| + CdmContextProvider(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(CdmContextProvider); |
| +}; |
| + |
| // Callback to notify that the CdmContext has been completely attached to |
| // the media pipeline. Parameter indicates whether the operation succeeded. |
| typedef base::Callback<void(bool)> CdmAttachedCB; |