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

Unified Diff: media/base/browser_cdm_factory.h

Issue 774423002: Provides method for setting a BrowserCdmFactory for IPC-based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include base/logging.h Created 6 years 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/base/android/browser_cdm_factory_android.cc ('k') | media/base/browser_cdm_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/browser_cdm_factory.h
diff --git a/media/base/browser_cdm_factory.h b/media/base/browser_cdm_factory.h
index e6fa47bcaf473a43f8540f8ddcbcd63012278f54..f73ca5d0802849625f19f2538efc424f03c8c838 100644
--- a/media/base/browser_cdm_factory.h
+++ b/media/base/browser_cdm_factory.h
@@ -7,12 +7,34 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "media/base/browser_cdm.h"
#include "media/base/media_export.h"
namespace media {
+class MEDIA_EXPORT BrowserCdmFactory {
+ public:
+ BrowserCdmFactory() {}
+ virtual ~BrowserCdmFactory() {}
+
+ virtual scoped_ptr<BrowserCdm> CreateBrowserCdm(
+ const std::string& key_system,
+ const BrowserCdm::SessionCreatedCB& session_created_cb,
+ const BrowserCdm::SessionMessageCB& session_message_cb,
+ const BrowserCdm::SessionReadyCB& session_ready_cb,
+ const BrowserCdm::SessionClosedCB& session_closed_cb,
+ const BrowserCdm::SessionErrorCB& session_error_cb) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BrowserCdmFactory);
+};
+
+// Provides a factory for creating BrowserCdm instances. There is only one
+// BrowserCdmFactory per process.
+void SetBrowserCdmFactory(BrowserCdmFactory* factory);
+
// Creates a BrowserCdm for |key_system|. Returns NULL if the CDM cannot be
// created.
// TODO(xhwang): Add ifdef for IPC based CDM.
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/base/browser_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698