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

Unified Diff: Source/modules/encryptedmedia/MediaKeys.cpp

Issue 186093003: Remove platform/drm files. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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: Source/modules/encryptedmedia/MediaKeys.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeys.cpp b/Source/modules/encryptedmedia/MediaKeys.cpp
index 31823f362198302400affbf7e48705846368c4e7..1e992fa43ffdd09e3507fac33390a305cffca351 100644
--- a/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -36,7 +36,8 @@
#include "platform/Logging.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/UUID.h"
-#include "platform/drm/ContentDecryptionModule.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebContentDecryptionModule.h"
#include "wtf/HashSet.h"
namespace WebCore {
@@ -69,7 +70,7 @@ PassRefPtrWillBeRawPtr<MediaKeys> MediaKeys::create(ExecutionContext* context, c
// 3. Let cdm be the content decryption module corresponding to keySystem.
// 4. Load cdm if necessary.
- OwnPtr<ContentDecryptionModule> cdm = ContentDecryptionModule::create(keySystem);
+ OwnPtr<blink::WebContentDecryptionModule> cdm = adoptPtr(blink::Platform::current()->createContentDecryptionModule(keySystem));
if (!cdm) {
exceptionState.throwDOMException(NotSupportedError, "A content decryption module could not be loaded for the '" + keySystem + "' key system.");
return nullptr;
@@ -81,7 +82,7 @@ PassRefPtrWillBeRawPtr<MediaKeys> MediaKeys::create(ExecutionContext* context, c
return adoptRefWillBeNoop(new MediaKeys(context, keySystem, cdm.release()));
}
-MediaKeys::MediaKeys(ExecutionContext* context, const String& keySystem, PassOwnPtr<ContentDecryptionModule> cdm)
+MediaKeys::MediaKeys(ExecutionContext* context, const String& keySystem, PassOwnPtr<blink::WebContentDecryptionModule> cdm)
: ContextLifecycleObserver(context)
, m_mediaElement(0)
, m_keySystem(keySystem)
@@ -172,7 +173,7 @@ void MediaKeys::setMediaElement(HTMLMediaElement* element)
blink::WebContentDecryptionModule* MediaKeys::contentDecryptionModule()
{
- return m_cdm ? m_cdm->contentDecryptionModule() : 0;
+ return m_cdm.get();
}
void MediaKeys::initializeNewSessionTimerFired(Timer<MediaKeys>*)

Powered by Google App Engine
This is Rietveld 408576698