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

Unified Diff: content/renderer/media/webcontentdecryptionmodule_impl.cc

Issue 660673002: Introduce CdmFactory interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_result_promise
Patch Set: Created 6 years, 2 months 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/renderer/media/webcontentdecryptionmodule_impl.cc
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.cc b/content/renderer/media/webcontentdecryptionmodule_impl.cc
index db10eea41dfaf0c3a1d2e1ae6dee0fd16a796335..518ffc9d03041f82080a8256cee51ea8d7795549 100644
--- a/content/renderer/media/webcontentdecryptionmodule_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.cc
@@ -4,9 +4,6 @@
#include "content/renderer/media/webcontentdecryptionmodule_impl.h"
-#include <map>
-#include <vector>
-
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/logging.h"
@@ -22,25 +19,13 @@
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "url/gurl.h"
-#if defined(ENABLE_PEPPER_CDMS)
-#include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
-#endif
-
namespace content {
WebContentDecryptionModuleImpl* WebContentDecryptionModuleImpl::Create(
-#if defined(ENABLE_PEPPER_CDMS)
- blink::WebLocalFrame* frame,
-#elif defined(ENABLE_BROWSER_CDMS)
- RendererCdmManager* manager,
-#endif
+ scoped_ptr<media::CdmFactory> cdm_factory,
const blink::WebSecurityOrigin& security_origin,
const base::string16& key_system) {
-#if defined(ENABLE_PEPPER_CDMS)
- DCHECK(frame);
-#elif defined(ENABLE_BROWSER_CDMS)
- DCHECK(manager);
-#endif
+ DCHECK(cdm_factory);
DCHECK(!security_origin.isNull());
DCHECK(!key_system.empty());
@@ -65,13 +50,7 @@ WebContentDecryptionModuleImpl* WebContentDecryptionModuleImpl::Create(
GURL security_origin_as_gurl(security_origin.toString());
if (!adapter->Initialize(
-#if defined(ENABLE_PEPPER_CDMS)
- base::Bind(&PepperCdmWrapperImpl::Create, frame),
-#elif defined(ENABLE_BROWSER_CDMS)
- manager,
-#endif
- key_system_ascii,
- security_origin_as_gurl)) {
+ cdm_factory.Pass(), key_system_ascii, security_origin_as_gurl)) {
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698