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

Issue 618013003: Support fullscreen for non-video elements in the WebView. (Closed)

Created:
6 years, 2 months ago by Ignacio Solla
Modified:
6 years, 2 months ago
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, nasko+codewatch_chromium.org, jam, penghuang+watch_chromium.org, mkwst+moarreviews-ipc_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, James Su, android-webview-reviews_chromium.org, benm (inactive)
Base URL:
https://chromium.googlesource.com/chromium/src.git@refactorFullscreenNonMedia
Project:
chromium
Visibility:
Public.

Description

Support fullscreen for non-video elements in the WebView. When the browser receives the toggleFullscreenModeForTab IPC we ask the app to show the custom ViewGroup (containing a FullscreenView with the web contents in fullscreen). If later (for the video element case) a ContentVideoView is created then we add it to the custom ViewGroup. The next steps (in subsequent changes) are: 1. Add tests for fullscreen for non-media elements in the WebView. 2. Changes to ensure that the power saver blocker works for video elements contained inside other elements. 3. Changes to ensure that scrolling works in fullscreen. This change also removes the now unused disallow_fullscreen_for_non_media_elements setting and simplifies the JNI interface in ContentVideoView. BUG=398485 Committed: https://crrev.com/3e28946a9edc2d794a894a6a4a0be965f8b62761 Cr-Commit-Position: refs/heads/master@{#299889}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Send IPC from RenderWidget.DidToggleFullscreen and removed DidEnter/ExitFullscreen #

Patch Set 3 : Removed verbose comment #

Total comments: 2

Patch Set 4 : Added comment and android ifdefs #

Total comments: 3

Patch Set 5 : Do not hold ContentVideoView ref in ContentViewCore #

Patch Set 6 : Remove did{Enter|Exit}Fullscreen IPCs #

Patch Set 7 : Rebase #

Total comments: 4

Patch Set 8 : Ack comments #

Patch Set 9 : Fix failing test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -92 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java View 1 2 3 4 5 3 chunks +51 lines, -40 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 2 chunks +9 lines, -2 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java View 1 2 3 4 5 6 3 chunks +12 lines, -10 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 2 comments Download
M android_webview/native/aw_settings.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/android/content_video_view.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 1 chunk +0 lines, -6 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -20 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 3 chunks +2 lines, -3 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/public/common/web_preferences.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/public/common/web_preferences.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 40 (6 generated)
Ignacio Solla
tsepez: Please review changes in view_messages.h and common_param_traits_macros.h jam: Please review changes in content/ mkosiba: ...
6 years, 2 months ago (2014-10-02 12:14:08 UTC) #2
mkosiba (inactive)
lgtm
6 years, 2 months ago (2014-10-02 14:19:57 UTC) #3
Tom Sepez
https://codereview.chromium.org/618013003/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/618013003/diff/1/content/common/view_messages.h#newcode1599 content/common/view_messages.h:1599: // bound into / out of fullscreen. In the ...
6 years, 2 months ago (2014-10-02 17:28:59 UTC) #4
Tom Sepez
Messages LGTM otherwise.
6 years, 2 months ago (2014-10-02 17:31:17 UTC) #5
Ignacio Solla
https://codereview.chromium.org/618013003/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/618013003/diff/1/content/common/view_messages.h#newcode1599 content/common/view_messages.h:1599: // bound into / out of fullscreen. In the ...
6 years, 2 months ago (2014-10-03 09:45:20 UTC) #6
qinmin
https://codereview.chromium.org/618013003/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/618013003/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode2802 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2802: getContentVideoViewClient().enterFullscreenVideo(mVideoView); we call WebMediaPlayer::enterfullscreen() in FullscreenController::didEnterFullScreen(), that call will ...
6 years, 2 months ago (2014-10-06 16:55:28 UTC) #7
Ignacio Solla
https://codereview.chromium.org/618013003/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/618013003/diff/40001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode2802 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2802: getContentVideoViewClient().enterFullscreenVideo(mVideoView); On 2014/10/06 16:55:28, qinmin wrote: > we call ...
6 years, 2 months ago (2014-10-07 18:14:43 UTC) #8
qinmin
lgtm
6 years, 2 months ago (2014-10-07 22:11:53 UTC) #9
jam
rerouting to sievers as I'm overloaded, thanks
6 years, 2 months ago (2014-10-08 22:28:46 UTC) #11
no sievers
Why do we need a fullscreen video view when you go into fullscreen for a ...
6 years, 2 months ago (2014-10-10 02:06:15 UTC) #12
no sievers
https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode365 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:365: private ContentVideoView mVideoView; Can you avoid holding this ref ...
6 years, 2 months ago (2014-10-10 02:15:25 UTC) #13
Ignacio Solla
On 2014/10/10 02:15:25, sievers wrote: > https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java > File > content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java > (right): > > ...
6 years, 2 months ago (2014-10-10 09:11:20 UTC) #14
Ignacio Solla
On 2014/10/10 02:06:15, sievers wrote: > Why do we need a fullscreen video view when ...
6 years, 2 months ago (2014-10-10 09:21:20 UTC) #15
Ignacio Solla
https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode365 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:365: private ContentVideoView mVideoView; On 2014/10/10 02:15:25, sievers wrote: > ...
6 years, 2 months ago (2014-10-10 09:23:41 UTC) #16
Ignacio Solla
https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode365 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:365: private ContentVideoView mVideoView; On 2014/10/10 09:23:41, Ignacio Solla wrote: ...
6 years, 2 months ago (2014-10-10 09:25:50 UTC) #17
Ignacio Solla
On 2014/10/10 09:21:20, Ignacio Solla wrote: > On 2014/10/10 02:06:15, sievers wrote: > > Why ...
6 years, 2 months ago (2014-10-10 16:14:35 UTC) #18
no sievers
On 2014/10/10 09:23:41, Ignacio Solla wrote: > https://codereview.chromium.org/618013003/diff/60001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java > File > content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java > (right): > ...
6 years, 2 months ago (2014-10-10 23:00:42 UTC) #19
Ignacio Solla
On 2014/10/10 23:00:42, sievers wrote: > On 2014/10/10 09:23:41, Ignacio Solla wrote: > > > ...
6 years, 2 months ago (2014-10-13 11:33:18 UTC) #20
no sievers
Maybe it might be easier to sort this out in chat or or quick video ...
6 years, 2 months ago (2014-10-13 17:45:46 UTC) #21
Ignacio Solla
On 2014/10/13 17:45:46, sievers wrote: > Maybe it might be easier to sort this out ...
6 years, 2 months ago (2014-10-13 18:00:16 UTC) #22
Ignacio Solla
On 2014/10/13 18:00:16, Ignacio Solla wrote: > On 2014/10/13 17:45:46, sievers wrote: > > Maybe ...
6 years, 2 months ago (2014-10-15 11:17:22 UTC) #23
no sievers
https://codereview.chromium.org/618013003/diff/310001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java File content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java (right): https://codereview.chromium.org/618013003/diff/310001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java#newcode431 content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java:431: contentViewCore.getContentVideoViewClient()); nit: contentViewCore.getContentVideoViewClient() -> client https://codereview.chromium.org/618013003/diff/310001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): ...
6 years, 2 months ago (2014-10-15 18:16:39 UTC) #24
Ignacio Solla
https://codereview.chromium.org/618013003/diff/310001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java File content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java (right): https://codereview.chromium.org/618013003/diff/310001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java#newcode431 content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java:431: contentViewCore.getContentVideoViewClient()); On 2014/10/15 18:16:38, sievers wrote: > nit: contentViewCore.getContentVideoViewClient() ...
6 years, 2 months ago (2014-10-15 18:38:42 UTC) #25
no sievers
lgtm
6 years, 2 months ago (2014-10-15 18:48:21 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618013003/330001
6 years, 2 months ago (2014-10-16 08:27:14 UTC) #28
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/18877)
6 years, 2 months ago (2014-10-16 10:07:31 UTC) #30
Ignacio Solla
https://codereview.chromium.org/618013003/diff/350001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java (left): https://codereview.chromium.org/618013003/diff/350001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java#oldcode49 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java:49: @DisableHardwareAccelerationForTest FYI: playing fullscreen video in the WebView requires ...
6 years, 2 months ago (2014-10-16 13:44:19 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618013003/350001
6 years, 2 months ago (2014-10-16 13:45:02 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:350001)
6 years, 2 months ago (2014-10-16 14:32:00 UTC) #34
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/3e28946a9edc2d794a894a6a4a0be965f8b62761 Cr-Commit-Position: refs/heads/master@{#299889}
6 years, 2 months ago (2014-10-16 14:32:41 UTC) #35
boliu
https://codereview.chromium.org/618013003/diff/350001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java (left): https://codereview.chromium.org/618013003/diff/350001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java#oldcode49 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java:49: @DisableHardwareAccelerationForTest On 2014/10/16 13:44:19, Ignacio Solla wrote: > FYI: ...
6 years, 2 months ago (2014-10-16 15:16:07 UTC) #37
Ignacio Solla
On 2014/10/16 15:16:07, boliu wrote: > https://codereview.chromium.org/618013003/diff/350001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java > File > android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java > (left): > > ...
6 years, 2 months ago (2014-10-16 15:20:10 UTC) #38
boliu
On 2014/10/16 15:20:10, Ignacio Solla wrote: > On 2014/10/16 15:16:07, boliu wrote: > > We ...
6 years, 2 months ago (2014-10-16 15:27:53 UTC) #39
Ignacio Solla
6 years, 2 months ago (2014-10-16 15:30:33 UTC) #40
Message was sent while issue was closed.
On 2014/10/16 15:27:53, boliu wrote:
> On 2014/10/16 15:20:10, Ignacio Solla wrote:
> > On 2014/10/16 15:16:07, boliu wrote:
> > > We should add a test that video in software mode doesn't cause deadlocks
> etc.
> > 
> > But fullscreen video in software mode is not supported.
> 
> Not supported doesn't mean we can deadlock in that case.
> 
> Not supported here just means the video itself won't show up, and that should
be
> the only issue. If a page loads a <video> and makes it go to full screen, we
> should not have any deadlocks even in software mode. Plus full screen video
used
> to worked in software mode, ie the video would show up, as that didn't require
> reading and compositing a texture, so no need for hardware acceleration.

Fair enough. I'll add a test for that in a follow-up patch.

Powered by Google App Engine
This is Rietveld 408576698