Revert "Revert "📺 Use video aspect ratio to determine PiP params.""

This reverts commit aa7f073f10e2976804fe009ef2d2ed182bef9ada.

Reason for revert: Attempt to reland

Original change's description:
> Revert "📺 Use video aspect ratio to determine PiP params."
> 
> This reverts commit 164f881f06faea76c87b246e2cdd17ab531416e5.
> 
> Reason for revert: Caused a failure https://build.chromium.org/p/chromium/builders/Android/builds/74079
> 
> Original change's description:
> > 📺 Use video aspect ratio to determine PiP params.
> > 
> > Use the bounds of the fullscreen video to determine the starting
> > bounds for the PiP transformation and the aspect ratio of the PiP
> > window.
> > 
> > Change-Id: Ia2227c9d277b5ae2a1dedddb899082e2947137fe
> > Reviewed-on: https://chromium-review.googlesource.com/536974
> > Commit-Queue: Peter Conn <[email protected]>
> > Reviewed-by: Jochen Eisinger <[email protected]>
> > Reviewed-by: Mounir Lamouri <[email protected]>
> > Reviewed-by: Bernhard Bauer <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#485916}
> 
> [email protected],[email protected],[email protected],[email protected]
> 
> Change-Id: I91b3e716c02bd5c41cf93d3fde04e0874d26d3e6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/566865
> Reviewed-by: Peter Conn <[email protected]>
> Commit-Queue: Peter Conn <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#485929}

[email protected],[email protected],[email protected],[email protected]

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I424442996ad0eb5728761cf86684720e6a435ffa
Reviewed-on: https://chromium-review.googlesource.com/618330
Reviewed-by: Peter Conn <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Commit-Queue: Peter Conn <[email protected]>
Cr-Commit-Position: refs/heads/master@{#495135}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2cc0af0e..1d8fb9a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5851,9 +5851,12 @@
     observer.MediaResized(size, id);
 }
 
-const WebContents::VideoSizeMap&
-WebContentsImpl::GetCurrentlyPlayingVideoSizes() {
-  return cached_video_sizes_;
+base::Optional<gfx::Size> WebContentsImpl::GetFullscreenVideoSize() {
+  base::Optional<WebContentsObserver::MediaPlayerId> id =
+      media_web_contents_observer_->GetFullscreenVideoMediaPlayerId();
+  if (id && cached_video_sizes_.count(id.value()))
+    return base::Optional<gfx::Size>(cached_video_sizes_[id.value()]);
+  return base::Optional<gfx::Size>();
 }
 
 int WebContentsImpl::GetCurrentlyPlayingVideoCount() {