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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout tests. Created 4 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: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index d155504bae46ec38c056b641233ceba6b7bd6980..562ee3186c420ee987872b897ff800b78a168b1e 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -130,7 +130,6 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
base::WeakPtr<WebMediaPlayerDelegate> delegate,
scoped_ptr<RendererFactory> renderer_factory,
- CdmFactory* cdm_factory,
linked_ptr<UrlIndex> url_index,
const WebMediaPlayerParams& params)
: frame_(frame),
@@ -181,12 +180,6 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
compositor_task_runner_,
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnNaturalSizeChanged),
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnOpacityChanged))),
- encrypted_media_support_(cdm_factory,
- encrypted_client,
- params.media_permission(),
- base::Bind(&WebMediaPlayerImpl::SetCdm,
- AsWeakPtr(),
- base::Bind(&IgnoreCdmAttached))),
is_cdm_attached_(false),
#if defined(OS_ANDROID) // WMPI_CAST
cast_impl_(this, client_, params.context_3d_cb()),
@@ -798,37 +791,6 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture(
return true;
}
-WebMediaPlayer::MediaKeyException
-WebMediaPlayerImpl::generateKeyRequest(const WebString& key_system,
- const unsigned char* init_data,
- unsigned init_data_length) {
- DCHECK(main_task_runner_->BelongsToCurrentThread());
-
- return encrypted_media_support_.GenerateKeyRequest(
- frame_, key_system, init_data, init_data_length);
-}
-
-WebMediaPlayer::MediaKeyException WebMediaPlayerImpl::addKey(
- const WebString& key_system,
- const unsigned char* key,
- unsigned key_length,
- const unsigned char* init_data,
- unsigned init_data_length,
- const WebString& session_id) {
- DCHECK(main_task_runner_->BelongsToCurrentThread());
-
- return encrypted_media_support_.AddKey(
- key_system, key, key_length, init_data, init_data_length, session_id);
-}
-
-WebMediaPlayer::MediaKeyException WebMediaPlayerImpl::cancelKeyRequest(
- const WebString& key_system,
- const WebString& session_id) {
- DCHECK(main_task_runner_->BelongsToCurrentThread());
-
- return encrypted_media_support_.CancelKeyRequest(key_system, session_id);
-}
-
void WebMediaPlayerImpl::setContentDecryptionModule(
blink::WebContentDecryptionModule* cdm,
blink::WebContentDecryptionModuleResult result) {
@@ -867,18 +829,15 @@ void WebMediaPlayerImpl::OnEncryptedMediaInitData(
const std::vector<uint8_t>& init_data) {
DCHECK(init_data_type != EmeInitDataType::UNKNOWN);
- // Do not fire "encrypted" event if encrypted media is not enabled.
- // TODO(xhwang): Handle this in |client_|.
- if (!blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled() &&
- !blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) {
+ // Do not fire the "encrypted" event if Encrypted Media is not enabled.
+ // EME may not be enabled on Android Jelly Bean.
+ if (!blink::WebRuntimeFeatures::isEncryptedMediaEnabled()) {
return;
}
// TODO(xhwang): Update this UMA name.
UMA_HISTOGRAM_COUNTS("Media.EME.NeedKey", 1);
- encrypted_media_support_.SetInitDataType(init_data_type);
-
encrypted_client_->encrypted(
ConvertToWebInitDataType(init_data_type), init_data.data(),
base::saturated_cast<unsigned int>(init_data.size()));

Powered by Google App Engine
This is Rietveld 408576698