commit | f09e446e4a5a905e972074c2fc4700a31533f25e | [log] [tgz] |
---|---|---|
author | François Beaufort <[email protected]> | Fri Jan 18 14:34:51 2019 |
committer | Commit Bot <[email protected]> | Fri Jan 18 14:34:51 2019 |
tree | cc728f79e2dd1aaae7a35fb4dbd85db4a68105a4 | |
parent | 8b06109490928adae220fc5c5add22a7a96e9e30 [diff] [blame] |
Add experimental support for Auto Picture-in-Picture This CL adds the autoPictureinPicture attribute to the HTMLVideoElement behind an experimental blink runtime flag so that web developers can play with Auto Picture-in-Picture behaviour by running chrome with the --enable-blink-features=AutoPictureInPicture switch. Spec: https://github.com/WICG/picture-in-picture/pull/112 Note that video with no audio don't play in Auto Picture-in-Picture because of background video optimizations. This will be addressed in an upcoming CL. Change-Id: I5aeb0e792ebf3b3ea32e0db8bebee660e640841f Bug: 917303 Reviewed-on: https://chromium-review.googlesource.com/c/1380533 Reviewed-by: Mounir Lamouri <[email protected]> Reviewed-by: Jochen Eisinger <[email protected]> Commit-Queue: François Beaufort <[email protected]> Cr-Commit-Position: refs/heads/master@{#624115}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 01fff8b0..feadb39 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6635,8 +6635,9 @@ gfx::Size WebContentsImpl::EnterPictureInPicture( const viz::SurfaceId& surface_id, const gfx::Size& natural_size) { - return delegate_ ? delegate_->EnterPictureInPicture(surface_id, natural_size) - : gfx::Size(); + return delegate_ + ? delegate_->EnterPictureInPicture(this, surface_id, natural_size) + : gfx::Size(); } void WebContentsImpl::ExitPictureInPicture() {