Window Placement: Gate cross-screen fullscreen behavior on permission

Check for permission on cross-screen fullscreen requests.
Do not prompt users, fall back to the current screen on failure.

Plumb the requesting RenderFrameHost into FullscreenController.
(needed to make the appropriate origin-specific permission check)
Remove the redundant WebContents args; rely on RenderFrameHost.

Bug: 1080690
Change-Id: I8ec80e8b1f1f64ad2de1f936f4656d41a6e8e9d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203268
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Balazs Engedy <[email protected]>
Commit-Queue: Michael Wasserman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#773250}
diff --git a/android_webview/browser/aw_web_contents_delegate.h b/android_webview/browser/aw_web_contents_delegate.h
index 602accb..b2bef05 100644
--- a/android_webview/browser/aw_web_contents_delegate.h
+++ b/android_webview/browser/aw_web_contents_delegate.h
@@ -70,8 +70,7 @@
       const content::MediaStreamRequest& request,
       content::MediaResponseCallback callback) override;
   void EnterFullscreenModeForTab(
-      content::WebContents* web_contents,
-      const GURL& origin,
+      content::RenderFrameHost* requesting_frame,
       const blink::mojom::FullscreenOptions& options) override;
   void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
   bool IsFullscreenForTabOrPending(