DescriptionFullscreen: make fullscreen requests come from RenderFrame.
This is implementing WebFrameClient::enterFullscreen and
::exitFullscreen in RenderFrameImpl which allows to associate
a fullscreen request to a specific frame.
This is keeping track of the origin by getting it from the
RenderFrameHost then forwards the call all the way to the
WebContentsDelegate.
This is also changing the permission handling by properly differentiate
requesting and embedding origins. If permission is given to a
top frame, it will always be allowed if that origin is embedded.
In addition, it allows OOPIF to request to go fullscreen. It does
not make them fullscreen but the top frame is because of the widget
not yet working correctly for OOPIF.
This part of a multi-sided CL:
Part 1: https://codereview.chromium.org/790543003/
Part 2: <this>
Part 3: https://codereview.chromium.org/782243003/
BUG=374854
TEST=Requires MANUAL testing because of fullscreen-related tests being all disabled for flakyness. Steps are:
- Remove all exceptions for fullscreen:
- Go to chrome://settings/content
- Click on "Manage Exceptions" in Fullscreen section;
- Remove all exceptions;
- Go to http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html
- Start the video and fullscreen it;
- The UI prompt should ask for fullscreen permission for youtube.com
- Click ALLOW
- Go to https://www.youtube.com, play any video and go fullscreen;
- You should see the same message as before, asking for permission.
- Press ESC;
- Remove all fullscreen exceptions as in the first step;
- Go back to http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html
- Play the video, go fullscreen
- It should ask again for permission, don't give it, press ESC;
- Go to https://www.youtube.com, play any video and go fullscreen;
- Press ALLOW and leave the video;
- Go back to http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html
- Play the video, go fullscreen
- The message should no longer ask for permission.
Committed: https://crrev.com/7a78d6fd7dc3241a91a614a09f9c59a0e4454135
Cr-Commit-Position: refs/heads/master@{#312038}
Patch Set 1 #
Total comments: 20
Patch Set 2 : review comments #Patch Set 3 : update webcontentsdelegateandroid #
Total comments: 19
Patch Set 4 : rebase #Patch Set 5 : review comments #
Total comments: 1
Patch Set 6 : review comments #Patch Set 7 : git cl format #Patch Set 8 : compile fixes #Patch Set 9 : #Patch Set 10 : #Patch Set 11 : rebase #Patch Set 12 : fix android build #Patch Set 13 : make try happy #Messages
Total messages: 52 (17 generated)
|