Android: Remove ContentViewCore.ContainerViewObserver |
|||||
Issue descriptionThese are only used by the ExternalVideoSurfaceContainer / video hole punching for Chromecast and WebView. public void addContainerViewObserver(ContainerViewObserver observer) public void removeContainerViewObserver(ContainerViewObserver observer) I'd like to get rid of this as part of the effort of ridding ContentViewCore of all the knowledge about Java container Views, in particular the switching out of container views (which should be a WebView implementation detail since the content layer doesn't really support it fully). The observer is only needed for the ExternalVideoSurfaceContainer to know when to reattach itself to a new container view. I hear hole punching being deprecated for WebView actually. I'm confused that it uses it at all. I thought that it uses ContentVideoView. (Which is better in this regard since it doesn't interact with the CVC's container view.) And I'm wondering if Cast maybe doesn't need to handle container view switching.
,
Jul 1 2016
+sanfin, tsunghung; I don't know what container view switching is, but I do know that we're actively working on removing video hole codepath from Cast on Android TV.
,
Jul 1 2016
Container View switching would be if you give the ContentViewCore a different ContentView (CVC.setContainerView()) at any time.
,
Jul 6 2016
what about the one from PopupTouchHandleDrawable? that's gonna be refactored away in some other way? VIDEO_HOLE hole punching is disabled in m52 webview, so if no one yells when that goes to stable, it can be removed entirely from webview
,
Jul 6 2016
Thanks for pointing out that call site which I missed. I don't understand how any of that does the right thing by listening to View position changes. What matters here is the content position and when you change the structure of the View then this triggers a layout and the handles need to be repositioned as dictated by the renderer. The only use case I can think of otherwise is if the View moves but the content doesn't change (same size). For going in and out of fullscreen in particular though (i.e. container view change) this seems like it would certainly involve a relayout.
,
Jul 6 2016
Does it maybe have to do with how WebView does scrolling? It seems to temporarily hide handles when the position changes. And then it also uses the View position as an offset to put the handles in the right place. Also I guess this code is only used by WebView nowadays. But if this is just for propagating scroll offsets maybe this can be done in a different way that doesn't require the PopupTouchHandleDrawable to know about the container view changing.
,
Aug 4 2016
I think maybe we can move PopupTouchHandleDrawable to webview so that the container view update event can be passed directly between them without cvc and inject it to content.
,
Aug 22 2016
,
Aug 31 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5356a1399fdc2e940db8553788ed2c540e5abe68 commit 5356a1399fdc2e940db8553788ed2c540e5abe68 Author: jinsukkim <jinsukkim@chromium.org> Date: Wed Aug 31 02:26:27 2016 android_webview: Let AwContents manage TouchHandleDrawable WebView's text selection handles(TouchHandleDrawables) should be notified when their container view gets swapped out to be repositioned accordingly. This is now being done through |ContainerViewObserver| in |ContentViewCore| which is slated for removal as a part of content layer refactoring. This CL makes use of a new interface method in |SynchronousCompositorClent| to let AwContents manage the handles directly, and notify them of the event of the container view switching. BUG= 624977 Review-Url: https://codereview.chromium.org/2263043002 Cr-Commit-Position: refs/heads/master@{#415542} [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/BUILD.gn [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/android_webview.gyp [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/browser/browser_view_renderer.cc [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/browser/browser_view_renderer.h [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/browser/browser_view_renderer_client.h [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/browser/test/rendering_test.cc [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/browser/test/rendering_test.h [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/java/src/org/chromium/android_webview/AwContents.java [rename] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/BUILD.gn [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/DEPS [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/aw_contents.cc [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/aw_contents.h [rename] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/popup_touch_handle_drawable.cc [rename] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/android_webview/native/popup_touch_handle_drawable.h [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/browser/android/synchronous_compositor_host.h [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/browser/renderer_host/render_widget_host_view_android.cc [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/content_browser.gypi [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/content_jni.gypi [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/public/android/BUILD.gn [modify] https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68/content/public/browser/android/synchronous_compositor_client.h
,
Sep 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/03c7e50720e3a9e79cc2b443269b8327bbe52475 commit 03c7e50720e3a9e79cc2b443269b8327bbe52475 Author: jinsukkim <jinsukkim@chromium.org> Date: Mon Sep 19 00:20:09 2016 Remove ContainerViewObserver ContainerViewObserver is used by ExternalVideoSurfaceContainer only, which in turn used by Chromecast/WebView. Since Chromecast never updates container view in its lifecycle, it can go without using ContainerViewObserver. And WebView disabled support for video hole since M52. With that, ContainerViewObserver is not used any more. This CL deletes the class. BUG= 624977 Review-Url: https://codereview.chromium.org/2293743002 Cr-Commit-Position: refs/heads/master@{#419403} [modify] https://crrev.com/03c7e50720e3a9e79cc2b443269b8327bbe52475/components/external_video_surface/android/java/src/org/chromium/components/external_video_surface/ExternalVideoSurfaceContainer.java [modify] https://crrev.com/03c7e50720e3a9e79cc2b443269b8327bbe52475/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
,
Sep 19 2016
,
Sep 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e03ab3adcb3134c665843469613c9a7faba46b5b commit e03ab3adcb3134c665843469613c9a7faba46b5b Author: jinsukkim <jinsukkim@chromium.org> Date: Thu Sep 22 00:06:03 2016 Remove ContainerViewObserver class Removes the class left unused after refactoring BUG= 624977 Review-Url: https://codereview.chromium.org/2360863002 Cr-Commit-Position: refs/heads/master@{#420208} [modify] https://crrev.com/e03ab3adcb3134c665843469613c9a7faba46b5b/content/public/android/BUILD.gn [delete] https://crrev.com/72e9876bdadd8cb4df5e813d03b5ca8d966d214f/content/public/android/java/src/org/chromium/content/browser/ContainerViewObserver.java |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by siev...@chromium.org
, Jun 30 2016