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

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

Issue 195053004: Create Pepper-based CDM for EME WD (Blink changes) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move provideMediaKeysTo() to MediaKeysController Created 6 years, 9 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
« no previous file with comments | « no previous file | Source/modules/encryptedmedia/MediaKeysClient.h » ('j') | Source/web/MediaKeysClientImpl.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeys.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeys.cpp b/Source/modules/encryptedmedia/MediaKeys.cpp
index b194898a779cea809761a51f4ba4a0ee2e0bd679..fc9040649051dfcc28783dc9e1048be20cafa8bc 100644
--- a/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -28,10 +28,13 @@
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ContextLifecycleObserver.h"
+#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/events/ThreadLocalEventNames.h"
#include "core/html/HTMLMediaElement.h"
#include "modules/encryptedmedia/MediaKeyMessageEvent.h"
+#include "modules/encryptedmedia/MediaKeysClient.h"
+#include "modules/encryptedmedia/MediaKeysController.h"
#include "platform/ContentType.h"
#include "platform/Logging.h"
#include "platform/MIMETypeRegistry.h"
@@ -70,7 +73,9 @@ PassRefPtrWillBeRawPtr<MediaKeys> MediaKeys::create(ExecutionContext* context, c
// 3. Let cdm be the content decryption module corresponding to keySystem.
// 4. Load cdm if necessary.
- OwnPtr<blink::WebContentDecryptionModule> cdm = adoptPtr(blink::Platform::current()->createContentDecryptionModule(keySystem));
+ Document* document = toDocument(context);
+ MediaKeysController* controller = MediaKeysController::from(document->page());
+ OwnPtr<blink::WebContentDecryptionModule> cdm = controller->createContentDecryptionModule(context, keySystem);
if (!cdm) {
exceptionState.throwDOMException(NotSupportedError, "A content decryption module could not be loaded for the '" + keySystem + "' key system.");
return nullptr;
« no previous file with comments | « no previous file | Source/modules/encryptedmedia/MediaKeysClient.h » ('j') | Source/web/MediaKeysClientImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698