| Index: content/browser/media/cdm/browser_cdm_manager.h
|
| diff --git a/content/browser/media/cdm/browser_cdm_manager.h b/content/browser/media/cdm/browser_cdm_manager.h
|
| index fd2168d35f64bd127c7bbbcd51a98c3ff66569c6..521de14aeba6ae53349978e841b73e0d47f19c37 100644
|
| --- a/content/browser/media/cdm/browser_cdm_manager.h
|
| +++ b/content/browser/media/cdm/browser_cdm_manager.h
|
| @@ -26,6 +26,10 @@
|
|
|
| struct CdmHostMsg_CreateSessionAndGenerateRequest_Params;
|
|
|
| +namespace media {
|
| +class CdmFactory;
|
| +}
|
| +
|
| namespace content {
|
|
|
| // This class manages all CDM objects. It receives control operations from the
|
| @@ -79,6 +83,10 @@ class CONTENT_EXPORT BrowserCdmManager : public BrowserMessageFilter {
|
| ~BrowserCdmManager() override;
|
|
|
| private:
|
| + // Returns the CdmFactory that can be used to create CDMs. Returns null if
|
| + // CDM is not supported.
|
| + media::CdmFactory* GetCdmFactory();
|
| +
|
| // CDM callbacks.
|
| void OnSessionMessage(int render_frame_id,
|
| int cdm_id,
|
| @@ -137,14 +145,13 @@ class CONTENT_EXPORT BrowserCdmManager : public BrowserMessageFilter {
|
| const std::string& session_id);
|
| void OnDestroyCdm(int render_frame_id, int cdm_id);
|
|
|
| - // Adds a new CDM identified by |cdm_id| for the given |key_system| and
|
| - // |security_origin|.
|
| - void AddCdm(int render_frame_id,
|
| - int cdm_id,
|
| - uint32_t promise_id,
|
| - const std::string& key_system,
|
| - const GURL& security_origin,
|
| - bool use_hw_secure_codecs);
|
| + // Callback for CDM creation.
|
| + void OnCdmCreated(int render_frame_id,
|
| + int cdm_id,
|
| + const GURL& security_origin,
|
| + scoped_ptr<media::SimpleCdmPromise> promise,
|
| + const scoped_refptr<media::MediaKeys>& cdm,
|
| + const std::string& error_message);
|
|
|
| // Removes all CDMs associated with |render_frame_id|.
|
| void RemoveAllCdmForFrame(int render_frame_id);
|
| @@ -193,6 +200,8 @@ class CONTENT_EXPORT BrowserCdmManager : public BrowserMessageFilter {
|
| // dispatched to the browser UI thread.
|
| scoped_refptr<base::TaskRunner> task_runner_;
|
|
|
| + scoped_ptr<media::CdmFactory> cdm_factory_;
|
| +
|
| // The key in the following maps is a combination of |render_frame_id| and
|
| // |cdm_id|.
|
|
|
|
|