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

Unified Diff: content/browser/media/cdm/browser_cdm_manager.h

Issue 1408793009: media: Remove BrowserCdmFactory inferface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment for DEPS change. 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: 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|.
« no previous file with comments | « chromecast/browser/media/cast_browser_cdm_factory.cc ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698