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

Issue 984963004: <webview>: Implement fullscreen permission for html5 element.requestFullscreen() (Closed)

Created:
5 years, 9 months ago by lazyboy
Modified:
5 years, 9 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@tmptmptmp
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

<webview>: Implement fullscreen permission for html5 element.requestFullscreen() We do it in two stages, first a DOM element requests fullscreen inside <webview>, this fires a permissionrequest to the embedder of <webview> to decide whether to allow/deny the request. The element goes fullscreen within the <webview>'s bounds at this point. The embedder can: a) allow the request: in this case we perform the second stage, where the <webview> element in the embedder enters fullscreen (provided that the embedder has permission to enter fullscreen). b) deny the request: in this case, <webview> exits fullscreen mode. Note that b) will cause a flicker and blink interface is required to avoid that. That is tracked on http://crbug.com/466854. BUG=141198 Test= Load a chrome app with a <webview> in it, make the <webview> point to some site that has html5 fullscreen request, e.g. youtube.com. Add an event listener in the chrome app so that it allows <webview> fullscreen, e.g. <webview>.addEventListener('permissionrequest', function(e) { if (e.permission === 'fullscreen') e.request.allow(); }); Now perform necessary action to request fullscreen from the <webview>, for the youtube case, this would be fullscreening the video player. Check that the element enters fullscreen mode. Committed: https://crrev.com/6d745d6dadfd0e161a91d7f3a21f919886ed8e7b Cr-Commit-Position: refs/heads/master@{#321282}

Patch Set 1 #

Total comments: 2

Patch Set 2 : rough export, added tests and logs #

Patch Set 3 : Clean up for review. #

Total comments: 16

Patch Set 4 : Also use document.webkitIsFullscreen in test #

Patch Set 5 : Address comments + remove unused param from OnFSPermissionDecided #

Patch Set 6 : Sync. #

Patch Set 7 : debug upload for checking mac trybot #

Patch Set 8 : Disable one test one test on mac with bug ref, use document.webkitIsFullScreen #

Unified diffs Side-by-side diffs Delta from patch set Stats (+757 lines, -15 lines) Patch
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +56 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_no_permission/embedder.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_no_permission/embedder.js View 1 2 3 4 5 6 7 1 chunk +176 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_no_permission/guest.js View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_no_permission/manifest.json View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_no_permission/test.js View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_permission/embedder.html View 1 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_permission/embedder.js View 1 2 3 4 5 6 7 1 chunk +176 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_permission/guest.js View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_permission/manifest.json View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/fullscreen/embedder_has_permission/test.js View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M extensions/browser/guest_view/guest_view_base.h View 1 2 3 4 3 chunks +8 lines, -2 lines 0 comments Download
M extensions/browser/guest_view/guest_view_base.cc View 1 2 3 4 5 chunks +37 lines, -10 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_constants.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_constants.cc View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.h View 1 2 3 4 4 chunks +14 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 4 chunks +73 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_permission_helper.cc View 3 chunks +10 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_permission_types.h View 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/renderer/guest_view/guest_view_internal_custom_bindings.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc View 1 2 3 chunks +15 lines, -0 lines 0 comments Download
M extensions/renderer/resources/guest_view/web_view/web_view.js View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M extensions/renderer/resources/guest_view/web_view/web_view_action_requests.js View 2 chunks +30 lines, -2 lines 0 comments Download
M extensions/renderer/resources/guest_view/web_view/web_view_events.js View 1 2 3 4 5 6 7 3 chunks +16 lines, -1 line 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 5 6 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
lazyboy
Please take a look. FYI, I've found the underlying cause in blink that we discussed ...
5 years, 9 months ago (2015-03-13 01:25:03 UTC) #2
Fady Samuel
Looking awesome! A few comments. https://chromiumcodereview.appspot.com/984963004/diff/1/extensions/browser/guest_view/web_view/web_view_guest.cc File extensions/browser/guest_view/web_view/web_view_guest.cc (right): https://chromiumcodereview.appspot.com/984963004/diff/1/extensions/browser/guest_view/web_view/web_view_guest.cc#newcode244 extensions/browser/guest_view/web_view/web_view_guest.cc:244: if (allowed) { Only ...
5 years, 9 months ago (2015-03-13 01:43:07 UTC) #3
lazyboy
https://chromiumcodereview.appspot.com/984963004/diff/40001/extensions/browser/guest_view/guest_view_base.cc File extensions/browser/guest_view/guest_view_base.cc (right): https://chromiumcodereview.appspot.com/984963004/diff/40001/extensions/browser/guest_view/guest_view_base.cc#newcode76 extensions/browser/guest_view/guest_view_base.cc:76: // toggled so guests can change itself accordingly. On ...
5 years, 9 months ago (2015-03-13 16:27:02 UTC) #4
Fady Samuel
lgtm
5 years, 9 months ago (2015-03-13 21:25:27 UTC) #5
lazyboy
asvitkine@chromium.org: Please review changes in tools/metrics/actions/actions.xml
5 years, 9 months ago (2015-03-14 18:20:23 UTC) #7
Alexei Svitkine (slow)
actions lgtm
5 years, 9 months ago (2015-03-14 23:17:41 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/984963004/140001
5 years, 9 months ago (2015-03-19 03:16:02 UTC) #11
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 9 months ago (2015-03-19 03:21:11 UTC) #12
commit-bot: I haz the power
5 years, 9 months ago (2015-03-19 03:22:04 UTC) #13
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6d745d6dadfd0e161a91d7f3a21f919886ed8e7b
Cr-Commit-Position: refs/heads/master@{#321282}

Powered by Google App Engine
This is Rietveld 408576698