Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed)

Created:
6 years ago by mlamouri (slow - plz ping)
Modified:
5 years, 11 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, extensions-reviews_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mkwst+moarreviews-shell_chromium.org, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fullscreen: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+379 lines, -201 lines) Patch
M android_webview/native/aw_web_contents_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +24 lines, -7 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +152 lines, -90 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +14 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -15 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +28 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -9 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download
M content/public/browser/render_view_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -9 lines 0 comments Download
M content/shell/browser/shell.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M content/shell/browser/shell.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -2 lines 0 comments Download
M extensions/browser/app_window/app_window.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (17 generated)
mlamouri (slow - plz ping)
dcheng@chromium.org: Please review changes in: *_messages.h creis@chromium.org: Please review changes in: * content/
6 years ago (2014-12-08 20:20:26 UTC) #2
mlamouri (slow - plz ping)
https://codereview.chromium.org/789533002/diff/1/content/browser/renderer_host/render_view_host_impl.h File content/browser/renderer_host/render_view_host_impl.h (right): https://codereview.chromium.org/789533002/diff/1/content/browser/renderer_host/render_view_host_impl.h#newcode295 content/browser/renderer_host/render_view_host_impl.h:295: void EnterFullscreen(const GURL& origin); It would probably have been ...
6 years ago (2014-12-08 20:21:57 UTC) #3
Charlie Reis
Thanks-- looks pretty close. I debated suggesting url::Origin instead of GURL for |origin|, but it ...
6 years ago (2014-12-10 00:51:21 UTC) #4
dcheng
https://codereview.chromium.org/789533002/diff/1/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/789533002/diff/1/content/browser/web_contents/web_contents_impl.cc#newcode1431 content/browser/web_contents/web_contents_impl.cc:1431: DCHECK(enter_fullscreen || origin.is_empty()); I'm not fond of this pattern. ...
6 years ago (2014-12-10 06:58:01 UTC) #5
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/789533002/diff/1/chrome/browser/ui/fullscreen/fullscreen_controller.h File chrome/browser/ui/fullscreen/fullscreen_controller.h (right): https://codereview.chromium.org/789533002/diff/1/chrome/browser/ui/fullscreen/fullscreen_controller.h#newcode98 chrome/browser/ui/fullscreen/fullscreen_controller.h:98: const GURL& origin, On 2014/12/10 00:51:21, Charlie Reis ...
6 years ago (2014-12-10 15:47:02 UTC) #6
Charlie Reis
Thanks! LGTM with nits. (Side note: Uploading rebases in their own patch set would have ...
6 years ago (2014-12-10 19:22:57 UTC) #7
Charlie Reis
[+site-isolation-reviews for FYI: making fullscreen frame specific for OOPIF]
6 years ago (2014-12-10 19:23:37 UTC) #8
mlamouri (slow - plz ping)
scheib@chromium.org: Please review changes in - chrome/browser/ui/fullscreen/ - extensions/
6 years ago (2014-12-10 20:36:53 UTC) #10
mlamouri (slow - plz ping)
blundell@chromium.org: Please review changes in: - components/web_contents_delegate_android/
6 years ago (2014-12-10 20:38:16 UTC) #12
mlamouri (slow - plz ping)
jhawkins@chromium.org: Please review changes in - chrome/browser/ui/browser.* - chrome/browser/ui/views/ (the fullscreen bits are being reviewed ...
6 years ago (2014-12-10 20:39:54 UTC) #14
dcheng
IPC changes lgtm https://codereview.chromium.org/789533002/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/789533002/diff/1/content/renderer/render_frame_impl.cc#newcode3417 content/renderer/render_frame_impl.cc:3417: bool RenderFrameImpl::enterFullscreen() On 2014/12/10 at 15:47:02, ...
6 years ago (2014-12-10 20:45:02 UTC) #16
blundell
https://codereview.chromium.org/789533002/diff/40001/components/web_contents_delegate_android/web_contents_delegate_android.cc File components/web_contents_delegate_android/web_contents_delegate_android.cc (right): https://codereview.chromium.org/789533002/diff/40001/components/web_contents_delegate_android/web_contents_delegate_android.cc#newcode384 components/web_contents_delegate_android/web_contents_delegate_android.cc:384: env, obj.obj(), true); Isn't this change a no-op? I ...
6 years ago (2014-12-10 20:47:16 UTC) #18
mlamouri (slow - plz ping)
6 years ago (2014-12-10 20:51:40 UTC) #20
mlamouri (slow - plz ping)
https://codereview.chromium.org/789533002/diff/40001/components/web_contents_delegate_android/web_contents_delegate_android.cc File components/web_contents_delegate_android/web_contents_delegate_android.cc (right): https://codereview.chromium.org/789533002/diff/40001/components/web_contents_delegate_android/web_contents_delegate_android.cc#newcode384 components/web_contents_delegate_android/web_contents_delegate_android.cc:384: env, obj.obj(), true); On 2014/12/10 20:47:15, blundell wrote: > ...
6 years ago (2014-12-10 20:52:35 UTC) #21
blundell
I see, didn't see the forest for the trees. lgtm
6 years ago (2014-12-10 20:53:24 UTC) #22
scheib
https://codereview.chromium.org/789533002/diff/40001/chrome/browser/ui/fullscreen/fullscreen_controller.cc File chrome/browser/ui/fullscreen/fullscreen_controller.cc (right): https://codereview.chromium.org/789533002/diff/40001/chrome/browser/ui/fullscreen/fullscreen_controller.cc#newcode422 chrome/browser/ui/fullscreen/fullscreen_controller.cc:422: settings_map->SetContentSetting( Should be updated to match GetContentSetting? https://codereview.chromium.org/789533002/diff/40001/chrome/browser/ui/fullscreen/fullscreen_controller.cc#newcode707 chrome/browser/ui/fullscreen/fullscreen_controller.cc:707: ...
6 years ago (2014-12-10 21:36:30 UTC) #23
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/789533002/diff/40001/chrome/browser/ui/fullscreen/fullscreen_controller.cc File chrome/browser/ui/fullscreen/fullscreen_controller.cc (left): https://codereview.chromium.org/789533002/diff/40001/chrome/browser/ui/fullscreen/fullscreen_controller.cc#oldcode143 chrome/browser/ui/fullscreen/fullscreen_controller.cc:143: // We need to update the fullscreen exit ...
6 years ago (2014-12-11 16:03:20 UTC) #24
scheib
extensions/* lgtm c/b/ui/fullscreen lgtm with improved comment Also TEST line (as discussed in person) should ...
6 years ago (2014-12-11 17:56:56 UTC) #25
mlamouri (slow - plz ping)
Comments applied, TEST steps written. I've also changed the top frame/embedded frame rule. I checked ...
6 years ago (2014-12-12 10:43:34 UTC) #27
felt
On 2014/12/12 10:43:34, Mounir Lamouri wrote: > Comments applied, TEST steps written. I've also changed ...
6 years ago (2014-12-12 15:34:53 UTC) #28
felt
On 2014/12/12 15:34:53, felt wrote: > On 2014/12/12 10:43:34, Mounir Lamouri wrote: > > Comments ...
6 years ago (2014-12-12 15:37:56 UTC) #29
scheib
Thanks, much clearer now.
6 years ago (2014-12-12 16:03:51 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/789533002/110001
6 years ago (2014-12-15 10:31:05 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/42951)
6 years ago (2014-12-15 10:43:46 UTC) #34
mlamouri (slow - plz ping)
torne@, could you have a look at the changes in android_webview/, should be mostly boilerplate.
5 years, 11 months ago (2015-01-16 14:48:37 UTC) #36
mlamouri (slow - plz ping)
Jochen, I am missing an OWNER review for the following files: - chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc - chrome/browser/ui/browser.cc ...
5 years, 11 months ago (2015-01-16 14:52:55 UTC) #38
Torne
android_webview LGTM
5 years, 11 months ago (2015-01-16 14:55:40 UTC) #39
jochen (gone - plz use gerrit)
lgtm.
5 years, 11 months ago (2015-01-16 15:04:15 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/789533002/220001
5 years, 11 months ago (2015-01-16 15:19:39 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/46017)
5 years, 11 months ago (2015-01-16 16:31:57 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/789533002/220001
5 years, 11 months ago (2015-01-16 16:33:44 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/46017)
5 years, 11 months ago (2015-01-16 16:34:16 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/789533002/220001
5 years, 11 months ago (2015-01-17 13:23:07 UTC) #50
commit-bot: I haz the power
Committed patchset #13 (id:220001)
5 years, 11 months ago (2015-01-17 13:24:23 UTC) #51
commit-bot: I haz the power
5 years, 11 months ago (2015-01-17 13:25:11 UTC) #52
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/7a78d6fd7dc3241a91a614a09f9c59a0e4454135
Cr-Commit-Position: refs/heads/master@{#312038}

Powered by Google App Engine
This is Rietveld 408576698