commit | 11e9ef43b00faa76e2e87c2abde123861ce9a4c4 | [log] [tgz] |
---|---|---|
author | Mounir Lamouri <[email protected]> | Tue May 22 03:10:16 2018 |
committer | Commit Bot <[email protected]> | Tue May 22 03:10:16 2018 |
tree | d9e43f5f7aeac6a2fc9f5bd276434575e8997585 | |
parent | 4b6b85a4a6e48e43b0a846fca761b05105217e52 [diff] [blame] |
Picture-in-Picture: resolve requestPictureInPicture with window size. Resolves the Web API promise with the actual size of the window after it was created. As a side effect, the promise is now resolved when the window is actually created instead of slightly after the call. Bug: 806249 Change-Id: Iab88e31ba2c1b6efcc5691dca43b02eee1e79412 Reviewed-on: https://chromium-review.googlesource.com/1060533 Commit-Queue: Mounir Lamouri <[email protected]> Reviewed-by: Nasko Oskov <[email protected]> Reviewed-by: apacible <[email protected]> Reviewed-by: Frank Liberato <[email protected]> Reviewed-by: Peter Kasting <[email protected]> Reviewed-by: François Beaufort <[email protected]> Cr-Commit-Position: refs/heads/master@{#560470}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 76feed1..fe0cfe25 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6112,6 +6112,13 @@ outermost->SetAsFocusedWebContentsIfNecessary(); } +gfx::Size WebContentsImpl::EnterPictureInPicture( + const viz::SurfaceId& surface_id, + const gfx::Size& natural_size) { + return delegate_ ? delegate_->EnterPictureInPicture(surface_id, natural_size) + : gfx::Size(); +} + void WebContentsImpl::ExitPictureInPicture() { if (delegate_) delegate_->ExitPictureInPicture();