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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Addressed comments. 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: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 3e1500e121bab874f209093e74cb36922672fd20..68788d6409b1f58a580ba7165444bf4dde896aad 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -352,6 +352,15 @@ void WebMediaPlayerImpl::exitedFullscreen() {
observer_->OnExitedFullscreen();
}
+void WebMediaPlayerImpl::videoViewportIntersectionChanged(
+ const blink::WebMediaPlayer::ViewportIntersectionInfo& info) {
+ MediaObserver::ViewportIntersectionInfo intersect_info;
+ intersect_info.root_rect = info.rootRect;
+ intersect_info.intersect_rect = info.intersectRect;
+ if (observer_)
+ observer_->OnVideoViewportIntersectionChanged(intersect_info);
+}
+
void WebMediaPlayerImpl::DoLoad(LoadType load_type,
const blink::WebURL& url,
CORSMode cors_mode) {

Powered by Google App Engine
This is Rietveld 408576698