New issue
Advanced search Search tips

Issue 789000 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Java-side WebContentsUserData

Project Member Reported by jinsuk...@chromium.org, Nov 28 2017

Issue description

ContentViewCore owns and manages GestureStateListeners that performs post-tasks after a certain gesture event has been processed for various classes. My plan is to introduce a new manager for GestureStateListener objects, and let WebContents own it. Embedders are required to get the instance of the manager from WebContents, and add/remove listeners as they want.

A few points to note:

- In WebView, GestureStateListeners can have a references to AwContents. So the manager should be defined in WebContentsInternals to meet WebView gc requirements.

- GestureStateListener is a pure interface without any default implementation. It can be turned to a real 'interface' with default empty method introduced in Java 8.

 
- cvc java will also be one of GestureStateListeners.

- Instead of RWHVA -> cvc -> cvc java -> GestureStateListeners,
             RWHVA -> RenderViewHostDelegateView(WebContentsViewAndroid) -> GestureStateListenerManager(name TBD) -> GSLM java -> GestureStateListeners


Comment 2 by boliu@chromium.org, Nov 29 2017

maybe it's time we have a java user data kind of thing. how many things are there just so webcontents can hold it now?
The proposal is (and a few more to come will be) is sketched out such that:

- A new class defines APIs migrated from CVC
- WebContents owns an instance of the class and has one new API exposing it, like get'TheNewClass'

I need to know if this is not a favored way going forward. Should we avoid adding a new API to WebContents at all costs?

Regarding Java user data - I wonder who is going to own the class inheriting it. I guess it will still be WebContents - holding all the instances keyed to it?

Comment 4 by boliu@chromium.org, Nov 29 2017

The point of UserData is that the class that supports the SupportsUserData class doesn't directly know the concrete types of the UserData subclasses.

So if it's is done correctly, WebContentsImpl should not need to import GestureStateListenerManager. And it should be GestureStateListenerManager.fromWebContents, not WebContentsImpl.getGestureStateListenerManager
> So if it's is done correctly, WebContentsImpl should not need to import GestureStateListenerManager. And it should be GestureStateListenerManager.fromWebContents, not WebContentsImpl.getGestureStateListenerManager

Yes it is supposed to work just like native UserData. But my question is who needs to own those instances in Java, unlike in native where the instances can manage their own lifetime. 

Comment 6 by boliu@chromium.org, Nov 29 2017

WebContentsImpl can hold a Map<Key, Class<? extends UserData>> kind of thing? I'm not sure what "Key" should be yet though.. maybe the subclass itself?

Comment 7 by boliu@chromium.org, Nov 29 2017

Uhh, it should be
Map<Class<? extends UserData>, ? extends UserData>

I don't know if there is a way to force the question marks to match for a particular key-value pair, but probably good enough?

I don't know java generics all that well either, so maybe this doesn't actually work
Thanks! So WebContents either ends up holding those UserData instances or there will be a class in the middle like UserDataManager? (owned by WebContents) managing them on behalf of WC. But it still has an advantage of not having to add an API to WC. 

I'll code it up and use GestureStateListener as the first example using it. I believe the points I added above are still valid. Let me know if you have any other concerns or things for me to consider.

Comment 9 by boliu@chromium.org, Nov 29 2017

> But my question is who needs to own those instances in Java, unlike in native where the instances can manage their own lifetime. 

Java is refcounted, so "ownership" doesn't really mean anything. I take it you mean whether WebContentsImpl should reference UserData objects strongly or weakly?

Umm... I dunno? Probably there are cases where it needs be weak? But that gets super annoying if it's some java-only data that don't care about that short of thing. Might need to be configurable :/
Is it worth trying to add the java objects directly to the native user data map?  Would any c++ components ever want to access the java objects w/o going through the java interface?

If you had a user data that existed both in c++ and had a java component, should it exist in one map or both?

Comment 11 by boliu@chromium.org, Nov 30 2017

> Is it worth trying to add the java objects directly to the native user data map?

Doesn't work well for java-only classes. And the story for webview gc related things is uhh... well, I don't want to think about it.

> Would any c++ components ever want to access the java objects w/o going through the java interface?

I'd say this should not happen, and only native foo should be calling into java foo.

> If you had a user data that existed both in c++ and had a java component, should it exist in one map or both?

Depends on GC story. If GC is not an issue, then whatever ownership that's convenient. But if GC is an issue, then the only option I see is they exist in both native and java userdata map, and native side holds a weak jni ref to the java one.


Hmm... you are right. That is a lot of choice though..
> If you had a user data that existed both in c++ and had a java component, should it exist in one map or both?

My idea for GestureStateListener (this component will have both Java and native class, as shown in #c2), for instance, is let the native observe WebContentsObserver::WebContentsDestroyed to destroy itself to align its lifetime with that of WebContents. So it doesn't have to be in the native data map.

Java-side userdata can be handled through WebContentsInternals to meet WebView gc requirements, just like it is done for injected JS objects.
Project Member

Comment 13 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05f03cbbe572b15421a945c1ed3c9397081423dd

commit 05f03cbbe572b15421a945c1ed3c9397081423dd
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Thu Nov 30 21:13:31 2017

Swich GestureStateListener from class to interface

GesatureStateListener has no concrete implementation for any interface
methods but declared as class just to avoid having to add many
empty methods in the implementation. Now it can take advantage
of default interface method and be declared as interface.

Bug:  789000 
Change-Id: Id0f7515a073ced947cf88bc1e6ded5cd69dc4868
Reviewed-on: https://chromium-review.googlesource.com/798870
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520686}
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java
[modify] https://crrev.com/05f03cbbe572b15421a945c1ed3c9397081423dd/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1f444a7641d6cf7924c4ca500de725259d274a4

commit d1f444a7641d6cf7924c4ca500de725259d274a4
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Tue Dec 12 22:43:34 2017

GestureListenerManager with UserData for WebContents

This CL introduces java UserData for WebContents in order to handle
data of the lifetime of WebContents without having them directly
associated with it. GestureStateListener objects being managed by
ContentViewCore is used to show how UserData can be used. They are
now managed by GestureListenerManager that implements UserData.
It can be obtained by |GestureListenerManager.fromWebContents()|
modeled after native UserData-inherited class, though it is not
as universal i.e. no SupportsUserData but only for WebContents.

Bug:  789000 

Change-Id: Icfbd3480314d261d90454f585d181e56f64aa8da
Reviewed-on: https://chromium-review.googlesource.com/792575
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523581}
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/BUILD.gn
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/android/content_view_core.cc
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/android/content_view_core.h
[add] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/android/gesture_listener_manager.cc
[add] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/android/gesture_listener_manager.h
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/renderer_host/render_view_host_delegate_view.cc
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/renderer_host/render_view_host_delegate_view.h
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/browser/web_contents/web_contents_view_android.h
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/BUILD.gn
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[add] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content/browser/GestureListenerManagerImpl.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
[add] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsUserData.java
[add] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content_public/browser/GestureListenerManager.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java
[modify] https://crrev.com/d1f444a7641d6cf7924c4ca500de725259d274a4/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java

Summary: Java-side WebContentsUserData (was: Refactor GestureStateListener flow)
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/411daff122946b3fdefbbd63e956cf8d72e15c8b

commit 411daff122946b3fdefbbd63e956cf8d72e15c8b
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Mon Jan 08 22:32:40 2018

WebContentsViewAndroid owns native GestureListenerManager

Native GestureListenerManager is owned by |WebContentsImpl|
via WebContentsUserData. This CL makes it simpler by not having
the class inherit WCUD but letting WebContentsViewAndroid
own it, since it was already referencing it.

Bug:  789000 

Change-Id: I0e340528d5b6a647e79145fe753e172a32dbcaff
Reviewed-on: https://chromium-review.googlesource.com/846594
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527786}
[modify] https://crrev.com/411daff122946b3fdefbbd63e956cf8d72e15c8b/content/browser/android/gesture_listener_manager.cc
[modify] https://crrev.com/411daff122946b3fdefbbd63e956cf8d72e15c8b/content/browser/android/gesture_listener_manager.h
[modify] https://crrev.com/411daff122946b3fdefbbd63e956cf8d72e15c8b/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/411daff122946b3fdefbbd63e956cf8d72e15c8b/content/browser/web_contents/web_contents_view_android.h

Project Member

Comment 17 by bugdroid1@chromium.org, Jan 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/abca31c3d2eff4950886c183eb1641fe2a053974

commit abca31c3d2eff4950886c183eb1641fe2a053974
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Wed Jan 10 11:09:54 2018

Migrate SelectionPopupController to WebContentsUserData

Turns SelectionPopupController to a public interface, and backs
its implementation with WebContentsUserData. This effectively
migrates numerous CVC APIs to the new interface.

Bug:  789000 

Change-Id: I899ffb1b67c033b019d07854b277b35872063831
Reviewed-on: https://chromium-review.googlesource.com/850134
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Pedro Amaral <amaralp@chromium.org>
Reviewed-by: Ted Choc (back but slow, ping me) <tedchoc@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528281}
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/android_webview/javatests/src/org/chromium/android_webview/test/PopupWindowTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/tab/TabStateBrowserControlsVisibilityDelegate.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/javatests/DEPS
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapEventTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/browser/android/selection_popup_controller.cc
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/BUILD.gn
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[rename] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content/browser/SelectionPopupControllerImpl.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content/browser/input/FloatingPastePopupMenu.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsUserData.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content_public/browser/ActionModeCallbackHelper.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content_public/browser/SelectionClient.java
[add] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/java/src/org/chromium/content_public/browser/SelectionPopupController.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/javatests/src/org/chromium/content/browser/input/ImeActivityTestRule.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/android/junit/src/org/chromium/content/browser/SelectionPopupControllerTest.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/test/android/BUILD.gn
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java
[add] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestSelectionPopupController.java
[modify] https://crrev.com/abca31c3d2eff4950886c183eb1641fe2a053974/content/shell/android/java/src/org/chromium/content_shell/Shell.java

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59ee3bacb5928a8bbaeec06e2d7207685728b1fb

commit 59ee3bacb5928a8bbaeec06e2d7207685728b1fb
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Thu Jan 11 03:14:03 2018

Fix Android Webview crash

Added a null checking against WebContents before attempting to
move the old TextClassifer(which can be null) to a new
SelectionPopupController.

Bug:  789000 
Change-Id: I9738971d79016b67a1a92f84bc4ce06da10f01c3
Reviewed-on: https://chromium-review.googlesource.com/860972
Reviewed-by: Tao Bai <michaelbai@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528546}
[modify] https://crrev.com/59ee3bacb5928a8bbaeec06e2d7207685728b1fb/android_webview/java/src/org/chromium/android_webview/AwContents.java

Project Member

Comment 19 by bugdroid1@chromium.org, Jan 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b980ed84f34f79b56a29a6f5bf28064744037c3f

commit b980ed84f34f79b56a29a6f5bf28064744037c3f
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Thu Jan 18 22:08:56 2018

Turns ImeAdapter into a public interface

This CL isolates ImeAdapter from ContentViewCore by turning ImeAdapter into a public
interface, and moving input-related CVC APIs to it. ImeAdapter implementation is
backed by WebContentUserData so that it can be obtained by |ImeAdapter.fromWebContents()|
any time. CVC which previously kept the reference to it, doesn't any more.


A few details in the changes:
 - InputMethodManagerWrapper needs not be open to public interface, but one of
the test-only methods requires it to facilitate testing (to inject
TestInputMethodManagerWrapper). It's used by tests only, so I decided not to move
it to content_public. Same goes for ChromiumBaseInputConnection. It is used for
testing only - didn't feel like it deserves relocation to content_public. Rewrote
the API |ImeAdapter.getInputConnectionForTest| to return |InputConnection|
instead of |ChromiumBaseInputConnection| to hide it in the interface though.
It's still in DEPS exception for javatest package to allow chrome/webview test
to use it.

- Now we have more objects in CVC that are managed via WebContentsUserData, did
a tiny refactoring to avoid using too many |isAlive| scattered around the class.
|onFocusChanged| in particular, there are not much cleanup worth doing if it
is called after CVC is destroyed, and hence losing the focus. For which case
it just hides popups and returns.

- Removed a method left unused (updateAfterSizeChanged).

Bug:  789000 
Change-Id: Iddfb7672d1789016745223837dea0d4dd5585e50
Reviewed-on: https://chromium-review.googlesource.com/867177
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530292}
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/android_webview/javatests/DEPS
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsGarbageCollectionTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/android_webview/javatests/src/org/chromium/android_webview/test/AwImeTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/BUILD.gn
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/ContentView.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/input/ChromiumBaseInputConnection.java
[rename] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java
[add] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content_public/browser/ImeAdapter.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/java/src/org/chromium/content_public/browser/ImeEventObserver.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreSelectionTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/javatests/src/org/chromium/content/browser/input/ImeActivityTestRule.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionTest.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java
[modify] https://crrev.com/b980ed84f34f79b56a29a6f5bf28064744037c3f/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java

Project Member

Comment 20 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c37f5b8bbe1976f61605c7595401259fba7e9a3b

commit c37f5b8bbe1976f61605c7595401259fba7e9a3b
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Mon Jan 29 23:06:35 2018

Backs PopupZoomer with WebContentsUserData

WebContents manages PopupZoomer (tap diambiguation) via WebContentsUserData.
To make the migration possible, split the class into |TapDisambiguator|
that is actually managed via WCUD, and |PopupZoomer| is now a pure UI part
implementing the popup view inheriting android.view.View.

Bug:  789000 
Change-Id: Icf36cf3075c0d79f642b585f7a1f8fc7150e8025
Reviewed-on: https://chromium-review.googlesource.com/872132
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532647}
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/browser/BUILD.gn
[delete] https://crrev.com/81a7d54a90c9ed42a492c56b88202d550f3230e3/content/browser/android/popup_zoomer.cc
[add] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/browser/android/tap_disambiguator.cc
[rename] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/browser/android/tap_disambiguator.h
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/BUILD.gn
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java
[add] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/java/src/org/chromium/content/browser/TapDisambiguator.java
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java
[modify] https://crrev.com/c37f5b8bbe1976f61605c7595401259fba7e9a3b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java

Project Member

Comment 21 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7a0a6175bc4689719425d08e980713c80d302d2

commit b7a0a6175bc4689719425d08e980713c80d302d2
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Tue Jan 30 02:50:23 2018

WebContentsAccessibility on WebContentsUserData

This CL moves Java WebContentsAccessibility to be managed by WebContentsUserData.
WebContentsAccessibility is now a public interface and its implementation is
renamed to WebContentsAccessibilityImpl, and takes over most of the a11y stuff
from CVC.

|WCAX.create| should be called once and only once per WebContents to instantiate
the class (it is guarded with assert to guarantee this), and
|WCAX.fromWebContents(WebContents)| returns the instance. It can return null
if called before |WCAX.create| or after WebContents is destroyed.

Also, moved around the methods in WebContentsAccessibilityImpl to group them by
  interface/native connection.

Bug:  789000 
Change-Id: I0525f5761cfd1d541cefacd784e40e4852ee541a
Reviewed-on: https://chromium-review.googlesource.com/858985
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532739}
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsGarbageCollectionTest.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/browser/accessibility/web_contents_accessibility_android.cc
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/BUILD.gn
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/ContentView.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatWebContentsAccessibility.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/accessibility/LollipopWebContentsAccessibility.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/accessibility/OWebContentsAccessibility.java
[rename] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsUserData.java
[add] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/java/src/org/chromium/content_public/browser/WebContentsAccessibility.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java
[modify] https://crrev.com/b7a0a6175bc4689719425d08e980713c80d302d2/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java

Project Member

Comment 22 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fbc7c1e4284e4b4078382777c35eaf5b40d27ece

commit fbc7c1e4284e4b4078382777c35eaf5b40d27ece
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Tue Jan 30 23:14:38 2018

TextSuggestionHost on WebContentsUserData

This CL moves Java TextSuggestionHost to be managed by
WebContentsUserData so ContentViewCore doesn't have to keep
a reference to the object, and the object can be obtained
easily by TextSuggestionHost.fromWebContents(). It helps
decouple the class from CVC.

Bug:  789000 
Change-Id: Iefdeb0a727fc975323b7f8f24d4eb187ad38601b
Reviewed-on: https://chromium-review.googlesource.com/892180
Reviewed-by: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533068}
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionHost.java
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
[modify] https://crrev.com/fbc7c1e4284e4b4078382777c35eaf5b40d27ece/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java

Status: Fixed (was: Assigned)
Project Member

Comment 24 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93

commit 9b2be953b12bea8eb8ba2f60c3340c2bf273ce93
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Fri Mar 02 05:43:04 2018

Android: WebContentsUserData-backed SelectPopup

Extends SelectPopup to take over the popup view for
<select> tag from ContentViewCore. Now SelectPopup is backed
by WebContentsUserData to manage its lifetime. Its native
is owned by |WebContentsViewAndroid| which calls the object
to show/hide the popup.

Bug:  789000 
Change-Id: Id62b4115729ddb8419065b555b30c64a699ec25a
Reviewed-on: https://chromium-review.googlesource.com/939204
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540456}
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/BUILD.gn
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/android/content_view_core.cc
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/android/content_view_core.h
[add] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/android/select_popup.cc
[add] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/android/select_popup.h
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/browser/web_contents/web_contents_view_android.h
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/BUILD.gn
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java
[modify] https://crrev.com/9b2be953b12bea8eb8ba2f60c3340c2bf273ce93/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java

Project Member

Comment 25 by bugdroid1@chromium.org, Mar 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab9ddaa634923400d06221b8f14619ea03b49f81

commit ab9ddaa634923400d06221b8f14619ea03b49f81
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Wed Mar 14 06:31:30 2018

Android: Back ContentViewCore with WebContentsUserData

With java WebContentsUserData in place, ContentViewCore doesn't
have to rely on native to retrieve its java object. This CL refactors
ContentViewCore so that it is backed by WebContentsUserData.

Bug:  789000 
Change-Id: Icf4b6b0e90e78cd8cfd4d7d74f1d14196736d2b5
Reviewed-on: https://chromium-review.googlesource.com/945035
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543019}
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/android_webview/java/src/org/chromium/android_webview/AwContents.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsService.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/components/content_view/java/src/org/chromium/components/content_view/ContentView.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/android/content_video_view.cc
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/android/content_video_view.h
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/android/content_view_core.cc
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/android/content_view_core.h
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/media/android/browser_media_player_manager.cc
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/browser/media/android/browser_surface_view_manager.cc
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/public/android/java/src/org/chromium/content_public/browser/ContentViewCore.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/public/android/javatests/src/org/chromium/content/browser/PopupZoomerTest.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestContentViewCore.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/shell/android/java/src/org/chromium/content_shell/Shell.java
[modify] https://crrev.com/ab9ddaa634923400d06221b8f14619ea03b49f81/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellActivityTestRule.java

Project Member

Comment 26 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/343599182ba14cb3d98c869c1afb01edc738e296

commit 343599182ba14cb3d98c869c1afb01edc738e296
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Tue Mar 20 02:03:17 2018

Do not use SupportsUserData for ContentViewCore

Stops the native ContentViewCore from using SupportUserData to manage
its lifetime. It was appropriate when |ContentViewCore::FromWebContents|
was required. Now that it's gone, it's desirable to manage it in a simpler
way (other class as an owner) to make the object implementation lighter.
This CL has WebContentsViewAndroid own it, and destroy it together at
the end of its life.

Alternatively tried to delete ContentViewCore upon
|WebContentsObserver::WebContentsDestroyed| that it implements, but it
led to a premature destruction that causes many tests fail. Note that
|SetContentViewCore(nullptr)| can be called on WCVA while CVC is still
alive, but WCVA still keeps the object till its own destruction
for this reason.

Bug:  789000 

Change-Id: I79f08752c645a24a53c58f6ef715f21f24a691dd
Reviewed-on: https://chromium-review.googlesource.com/961623
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544260}
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/android/content_view_core.cc
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/android/content_view_core.h
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/343599182ba14cb3d98c869c1afb01edc738e296/content/browser/web_contents/web_contents_view_android.h

Project Member

Comment 27 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80f51807028d3bc23f16f2572e565a23f823469b

commit 80f51807028d3bc23f16f2572e565a23f823469b
Author: Jinsuk Kim <jinsukkim@chromium.org>
Date: Thu Apr 05 22:32:44 2018

Android: UserData API for WebContents

Adds public API {set|get}UserData to WebContents for embedders to
make use to manage objects of WebContents lifetime without hanging
onto WebContents directly.

Coming up next is ContentView refactored to leverage the public API.
Then embedders will be able to get the container view from webContents,
making WebContents a drop-in replacement for ContentViewCore for many cases.

Bug:  789000 
Change-Id: Iad1e93143da5a83e19c86112acd2a94c00a208af
Reviewed-on: https://chromium-review.googlesource.com/994499
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548591}
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/GestureListenerManagerImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/JavascriptInjectorImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/JoystickHandler.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/PopupController.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/TapDisambiguator.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionHost.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsUserData.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java
[modify] https://crrev.com/80f51807028d3bc23f16f2572e565a23f823469b/content/public/test/android/javatests/src/org/chromium/content/browser/test/mock/MockWebContents.java

Sign in to add a comment