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

Issue 799953002: [WebView] Move external video surface across container views. (Closed)

Created:
6 years ago by Ignacio Solla
Modified:
5 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org, qinmin, Hugo Holgersson
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[WebView] Move external video surface across container views. When transitioning from/to fullscreen the WebView replaces the container view. We need to move the ExternalVideoSurfaceContainer across container views when this happens. Note that in fullscreen the video may still be embedded in the page if the element in fullscreen is, for example, a <div> containing the <video>. BUG=440774, 398485 TEST=Manual 1. Force use of external surface (set needs_external_surface_ to true in webmediaplayer_android.cc) 2. Load the following url on a test app using a WebView: http://robnyman.github.io/fullscreen/ 3. Test with 2 different actions here: a. Go fullscreen on the <video> element by clicking on the fullscreen video control b. Go fullscreen on the <div> element by clicking on the “Fullscreen” button 4. Notice: video continues in fullscreen without frozen video and in the case of b the video still scrolls with the page Committed: https://crrev.com/5eba22cd252a34432d26649b06fa4e574fc84528 Cr-Commit-Position: refs/heads/master@{#309000}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Address review comments #

Patch Set 3 : Rebase #

Total comments: 4

Patch Set 4 : Added tests #

Total comments: 8

Patch Set 5 : Removed unnecessary polling and nits. #

Total comments: 2

Patch Set 6 : Nit #

Total comments: 6

Patch Set 7 : Run containsChildOfType on UI thread #

Messages

Total messages: 33 (8 generated)
Ignacio Solla
boliu@chromium.org: please review all changes. benm@chromium.org: for owners LGTM.
6 years ago (2014-12-12 15:37:39 UTC) #2
boliu
And test pls? https://codereview.chromium.org/799953002/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java File android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java (right): https://codereview.chromium.org/799953002/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java#newcode18 android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java:18: import org.chromium.content.browser.ContentViewCore.ContainerViewChangedListener; There is an identical ...
6 years ago (2014-12-12 17:24:17 UTC) #3
gunsch
https://codereview.chromium.org/799953002/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java File android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java (right): https://codereview.chromium.org/799953002/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java#newcode18 android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java:18: import org.chromium.content.browser.ContentViewCore.ContainerViewChangedListener; On 2014/12/12 17:24:16, boliu wrote: > There ...
6 years ago (2014-12-12 17:32:12 UTC) #5
Ignacio Solla
I'd like to submit this ASAP to unblock sony and fix it in the next ...
6 years ago (2014-12-15 14:12:12 UTC) #6
boliu
On 2014/12/15 14:12:12, Ignacio Solla wrote: > I'd like to submit this ASAP to unblock ...
6 years ago (2014-12-15 16:23:09 UTC) #8
Ignacio Solla
Added tests now forcing the use of the external surface. https://codereview.chromium.org/799953002/diff/40001/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java File android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java (right): https://codereview.chromium.org/799953002/diff/40001/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java#newcode196 ...
6 years ago (2014-12-16 10:46:02 UTC) #11
Ignacio Solla
Added tests now forcing the use of the external surface. https://codereview.chromium.org/799953002/diff/40001/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java File android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java (right): https://codereview.chromium.org/799953002/diff/40001/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java#newcode196 ...
6 years ago (2014-12-16 10:46:03 UTC) #12
ycheo (away)
On 2014/12/15 16:23:09, boliu wrote: > On 2014/12/15 14:12:12, Ignacio Solla wrote: > > I'd ...
6 years ago (2014-12-16 15:58:56 UTC) #13
Ignacio Solla
On 2014/12/16 15:58:56, Yuncheol Heo wrote: > On 2014/12/15 16:23:09, boliu wrote: > > On ...
6 years ago (2014-12-16 16:03:34 UTC) #14
gunsch
chromecast/ rs lgtm
6 years ago (2014-12-16 16:07:21 UTC) #15
boliu
Thanks for the tests :D https://codereview.chromium.org/799953002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/799953002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode196 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:196: assertContainsHolePunchingSurfaceView(mTestContainerView, false); polling doesn't ...
6 years ago (2014-12-16 16:44:19 UTC) #16
Ignacio Solla
https://codereview.chromium.org/799953002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/799953002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode196 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:196: assertContainsHolePunchingSurfaceView(mTestContainerView, false); On 2014/12/16 16:44:19, boliu wrote: > polling ...
6 years ago (2014-12-16 18:57:40 UTC) #17
boliu
aw lgtm The parameter question is for the content owner to decide. https://codereview.chromium.org/799953002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java ...
6 years ago (2014-12-16 19:06:52 UTC) #18
Ignacio Solla
https://codereview.chromium.org/799953002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/799953002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode478 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:478: private boolean containsChildOfType(View view, final Class<?> childType) { On ...
6 years ago (2014-12-16 19:09:16 UTC) #19
Ignacio Solla
On 2014/12/16 19:09:16, Ignacio Solla wrote: > https://codereview.chromium.org/799953002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java > File > android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java > (right): > ...
6 years ago (2014-12-17 14:17:21 UTC) #20
boliu
On 2014/12/17 14:17:21, Ignacio Solla wrote: > I need to fix one of the tests. ...
6 years ago (2014-12-17 14:45:35 UTC) #21
Hugo Holgersson
https://codereview.chromium.org/799953002/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/799953002/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode197 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:197: DOMUtils.waitForVideoPlay(getWebContentsOnUiThread(), VIDEO_ID); How about assertTrue(DOMUtils.waitForVideoPlay...)? I mean, before we ...
6 years ago (2014-12-17 15:05:13 UTC) #23
Ignacio Solla
On 2014/12/17 14:45:35, boliu wrote: > On 2014/12/17 14:17:21, Ignacio Solla wrote: > > I ...
6 years ago (2014-12-17 17:34:37 UTC) #24
Ignacio Solla
https://codereview.chromium.org/799953002/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java (right): https://codereview.chromium.org/799953002/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java#newcode197 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java:197: DOMUtils.waitForVideoPlay(getWebContentsOnUiThread(), VIDEO_ID); On 2014/12/17 15:05:13, Hugo Holgersson wrote: > ...
6 years ago (2014-12-17 17:34:56 UTC) #25
Ignacio Solla
On 2014/12/17 17:34:56, Ignacio Solla wrote: > https://codereview.chromium.org/799953002/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java > File > android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java > (right): > ...
6 years ago (2014-12-17 18:46:41 UTC) #26
boliu
On 2014/12/17 18:46:41, Ignacio Solla wrote: > It seems it worked, but there was some ...
6 years ago (2014-12-17 18:52:19 UTC) #27
benm (inactive)
lgtm I like the pattern of passing the new container in the observer callback rather ...
6 years ago (2014-12-17 19:12:28 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/799953002/120001
6 years ago (2014-12-18 12:44:15 UTC) #30
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years ago (2014-12-18 13:37:43 UTC) #31
commit-bot: I haz the power
6 years ago (2014-12-18 13:38:45 UTC) #32
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/5eba22cd252a34432d26649b06fa4e574fc84528
Cr-Commit-Position: refs/heads/master@{#309000}

Powered by Google App Engine
This is Rietveld 408576698