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

Unified Diff: content/renderer/media/crypto/encrypted_media_player_support_impl.cc

Issue 594713002: Pass initial CDM to CreateMediaPlayer() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/crypto/encrypted_media_player_support_impl.cc
diff --git a/content/renderer/media/crypto/encrypted_media_player_support_impl.cc b/content/renderer/media/crypto/encrypted_media_player_support_impl.cc
index c884cd6ac227e474860f42ee7685b7da6fafa21a..2ebde238e9024fb90d6774e6ab3b4201d1ca42ad 100644
--- a/content/renderer/media/crypto/encrypted_media_player_support_impl.cc
+++ b/content/renderer/media/crypto/encrypted_media_player_support_impl.cc
@@ -296,6 +296,14 @@ EncryptedMediaPlayerSupportImpl::CancelKeyRequestInternal(
return WebMediaPlayer::MediaKeyExceptionNoError;
}
+void EncryptedMediaPlayerSupportImpl::SetInitialContentDecryptionModule(
+ blink::WebContentDecryptionModule* cdm) {
+ // Used when loading media and no pipeline/decoder attached yet.
+ DCHECK(decryptor_ready_cb_.is_null());
ddorwin 2014/09/23 18:03:23 DCHECK(cdm) too.
jrummell 2014/09/23 20:01:38 |cdm| can be null if not set when player created.
ddorwin 2014/09/23 20:08:41 Ah, yes. I was thinking we had already checked tha
+
+ web_cdm_ = ToWebContentDecryptionModuleImpl(cdm);
+}
+
void EncryptedMediaPlayerSupportImpl::SetContentDecryptionModule(
blink::WebContentDecryptionModule* cdm) {
// TODO(xhwang): Support setMediaKeys(0) if necessary: http://crbug.com/330324
@@ -335,14 +343,6 @@ void EncryptedMediaPlayerSupportImpl::SetContentDecryptionModule(
}
}
-void EncryptedMediaPlayerSupportImpl::SetContentDecryptionModuleSync(
- blink::WebContentDecryptionModule* cdm) {
- // Used when loading media and no pipeline/decoder attached yet.
- DCHECK(decryptor_ready_cb_.is_null());
-
- web_cdm_ = ToWebContentDecryptionModuleImpl(cdm);
-}
-
void EncryptedMediaPlayerSupportImpl::ContentDecryptionModuleAttached(
blink::WebContentDecryptionModuleResult result,
bool success) {

Powered by Google App Engine
This is Rietveld 408576698