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

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

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Add building flag. Created 4 years, 2 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: 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 e730ac088b2b7366f013c1bc0658694868ba7f58..d9485f3a9fb9149220be31abaf2159cfad9351cb 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -787,9 +787,17 @@ std::unique_ptr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
HTMLMediaElementEncryptedMedia& encryptedMedia =
HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
- return wrapUnique(webFrame->client()->createMediaPlayer(
- source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(),
- sinkId));
+ 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>

Powered by Google App Engine
This is Rietveld 408576698