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

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

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Fix trybots failure. Created 4 years, 1 month 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 2081e50930d46df5178f439c030e0c500b6519f8..d730272395446621c060ab2eb99fcf6d2694cc8d 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -775,9 +775,15 @@ 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));
+ WebMediaPlayer::ViewportIntersectionInfo intersectInfo =
+ htmlMediaElement.currentViewportIntersection();
+ if (!intersectInfo.intersectRect.isEmpty())
+ mediaPlayer->videoViewportIntersectionChanged(intersectInfo);
+ return mediaPlayer;
}
WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient(
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698