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

Unified Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 423633002: Make HTMLMediaElement.setMediaKeys() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase + add comment 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
« no previous file with comments | « Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.idl ('k') | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebMediaPlayerClientImpl.cpp
diff --git a/Source/web/WebMediaPlayerClientImpl.cpp b/Source/web/WebMediaPlayerClientImpl.cpp
index 96112c34378b35bf8f15e864a853eb14f9ebf967..e326a2e30c029c7236e0957bc7e2f353dcb365f8 100644
--- a/Source/web/WebMediaPlayerClientImpl.cpp
+++ b/Source/web/WebMediaPlayerClientImpl.cpp
@@ -50,13 +50,13 @@
namespace blink {
-static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const WebURL& url, LocalFrame* frame)
+static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const WebURL& url, LocalFrame* frame, WebContentDecryptionModule* initialCdm)
{
WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
if (!webFrame || !webFrame->client())
return nullptr;
- return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client));
+ return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client, initialCdm));
}
WebMediaPlayer* WebMediaPlayerClientImpl::webMediaPlayer() const
@@ -206,7 +206,7 @@ void WebMediaPlayerClientImpl::load(WebMediaPlayer::LoadType loadType, const WTF
WebURL poster = m_client->mediaPlayerPosterURL();
KURL kurl(ParsedURLString, url);
- m_webMediaPlayer = createWebMediaPlayer(this, kurl, frame);
+ m_webMediaPlayer = createWebMediaPlayer(this, kurl, frame, HTMLMediaElementEncryptedMedia::contentDecryptionModule(mediaElement()));
if (!m_webMediaPlayer)
return;
@@ -219,8 +219,6 @@ void WebMediaPlayerClientImpl::load(WebMediaPlayer::LoadType loadType, const WTF
m_webMediaPlayer->setPoster(poster);
- // Tell WebMediaPlayer about any connected CDM (may be null).
- m_webMediaPlayer->setContentDecryptionModule(HTMLMediaElementEncryptedMedia::contentDecryptionModule(mediaElement()));
m_webMediaPlayer->load(loadType, kurl, corsMode);
}
« no previous file with comments | « Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.idl ('k') | public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698