<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. Review URL: https://codereview.chromium.org/984963004 Cr-Commit-Position: refs/heads/master@{#321282}
Showing
Please register or sign in to comment