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

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 2204673004: WIP - WebMediaPlayer switch media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and some fixes. Created 4 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 | « media/remoting/remoting_renderer_factory.cc ('k') | third_party/WebKit/Source/web/FullscreenController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 3d4abe9aa49f85fafdd94633bd84ea83ebe1c888..c57a3e77bfb961e1f5b714132fc131bc4ddb757f 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -788,9 +788,15 @@ std::unique_ptr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
- return wrapUnique(webFrame->client()->createMediaPlayer(source,
+ std::unique_ptr<WebMediaPlayer> mediaPlayer = wrapUnique(webFrame->client()->createMediaPlayer(source,
client, &encryptedMedia,
encryptedMedia.contentDecryptionModule(), sinkId));
+
+ Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(htmlMediaElement.document());
+ if (fullscreenElement->contains(&htmlMediaElement))
+ mediaPlayer->ancestorEnteredFullscreen();
+
+ return mediaPlayer;
}
std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
« no previous file with comments | « media/remoting/remoting_renderer_factory.cc ('k') | third_party/WebKit/Source/web/FullscreenController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698