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

Issue 2263043002: android_webview: Let AwContents manage TouchHandleDrawable (Closed)

Created:
4 years, 4 months ago by Jinsuk Kim
Modified:
4 years, 3 months ago
CC:
amaralp, android-webview-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, nona+watch_chromium.org, shuchen+watch_chromium.org, James Su, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68 Cr-Commit-Position: refs/heads/master@{#415542}

Patch Set 1 #

Total comments: 3

Patch Set 2 : use SynchronousCompositorClient #

Total comments: 21

Patch Set 3 : comments #

Patch Set 4 : create drawable from Java #

Total comments: 10

Patch Set 5 : DestroyAllDrawables #

Total comments: 4

Patch Set 6 : drawable destroy() -> remove #

Total comments: 4

Patch Set 7 : observer list #

Patch Set 8 : fix build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -751 lines) Patch
M android_webview/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/android_webview.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer.h View 1 2 5 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer_client.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M android_webview/browser/test/rendering_test.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M android_webview/browser/test/rendering_test.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 4 chunks +14 lines, -0 lines 0 comments Download
A + android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java View 1 2 3 4 5 6 7 10 chunks +42 lines, -30 lines 0 comments Download
M android_webview/native/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M android_webview/native/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 5 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A + android_webview/native/popup_touch_handle_drawable.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -10 lines 0 comments Download
A + android_webview/native/popup_touch_handle_drawable.cc View 1 2 3 4 5 6 7 4 chunks +29 lines, -28 lines 0 comments Download
D content/browser/android/popup_touch_handle_drawable.h View 1 chunk +0 lines, -51 lines 0 comments Download
D content/browser/android/popup_touch_handle_drawable.cc View 1 chunk +0 lines, -105 lines 0 comments Download
M content/browser/android/synchronous_compositor_host.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -5 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M content/content_jni.gypi View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java View 1 1 chunk +0 lines, -518 lines 0 comments Download
M content/public/browser/android/synchronous_compositor_client.h View 1 5 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (22 generated)
Jinsuk Kim
Bo/Daniel I haven't fully tested this yet, but could I have your initial review on ...
4 years, 4 months ago (2016-08-22 07:00:49 UTC) #2
boliu
Feels like PopupTouchHandleDrawable should be moved to android_webview instead. Looks should be pretty easy? If ...
4 years, 4 months ago (2016-08-22 18:10:47 UTC) #3
Jinsuk Kim
On 2016/08/22 18:10:47, boliu wrote: > Feels like PopupTouchHandleDrawable should be moved to android_webview instead. ...
4 years, 4 months ago (2016-08-23 06:39:02 UTC) #4
Jinsuk Kim
Thanks for the feedback. https://codereview.chromium.org/2263043002/diff/1/content/public/browser/android/popup_touch_handle_drawable.h File content/public/browser/android/popup_touch_handle_drawable.h (right): https://codereview.chromium.org/2263043002/diff/1/content/public/browser/android/popup_touch_handle_drawable.h#newcode38 content/public/browser/android/popup_touch_handle_drawable.h:38: const base::android::ScopedJavaLocalRef<jobject> I guess I ...
4 years, 4 months ago (2016-08-23 06:41:33 UTC) #5
Jinsuk Kim
On 2016/08/23 06:39:02, Jinsuk wrote: > On 2016/08/22 18:10:47, boliu wrote: > > Feels like ...
4 years, 4 months ago (2016-08-23 07:02:52 UTC) #6
boliu
On 2016/08/23 07:02:52, Jinsuk wrote: > On 2016/08/23 06:39:02, Jinsuk wrote: > > On 2016/08/22 ...
4 years, 4 months ago (2016-08-23 15:02:29 UTC) #7
boliu
https://codereview.chromium.org/2263043002/diff/1/content/public/browser/android/popup_touch_handle_drawable.h File content/public/browser/android/popup_touch_handle_drawable.h (right): https://codereview.chromium.org/2263043002/diff/1/content/public/browser/android/popup_touch_handle_drawable.h#newcode38 content/public/browser/android/popup_touch_handle_drawable.h:38: const base::android::ScopedJavaLocalRef<jobject> On 2016/08/23 06:41:33, Jinsuk wrote: > I ...
4 years, 4 months ago (2016-08-23 15:03:26 UTC) #8
Jinsuk Kim
On 2016/08/23 15:02:29, boliu wrote: > On 2016/08/23 07:02:52, Jinsuk wrote: > > On 2016/08/23 ...
4 years, 4 months ago (2016-08-24 01:48:06 UTC) #9
Jinsuk Kim
> I checked out SynchronousCompositorClient and it seems like a good > alternative delegating the ...
4 years, 4 months ago (2016-08-24 06:35:11 UTC) #11
boliu
I think it's easier now to create PopupTouchHandleDrawable from Java AwContents, then java PopupTouchHandleDrawable can ...
4 years, 3 months ago (2016-08-24 23:35:31 UTC) #13
Jinsuk Kim
I don't have a concrete idea how to create PopupTouchHandlDrawable from java and go down ...
4 years, 3 months ago (2016-08-25 07:32:21 UTC) #14
boliu
haven't reviewed new changes yet... On 2016/08/25 07:32:21, Jinsuk wrote: > I don't have a ...
4 years, 3 months ago (2016-08-25 20:51:29 UTC) #15
Jinsuk Kim
On 2016/08/25 20:51:29, boliu wrote: > haven't reviewed new changes yet... > > On 2016/08/25 ...
4 years, 3 months ago (2016-08-26 01:07:29 UTC) #16
boliu
https://codereview.chromium.org/2263043002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2263043002/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2693 android_webview/java/src/org/chromium/android_webview/AwContents.java:2693: mTouchHandleDrawables.add(drawable); On 2016/08/25 07:32:21, Jinsuk wrote: > On 2016/08/24 ...
4 years, 3 months ago (2016-08-26 04:15:45 UTC) #17
Jinsuk Kim
PTAL https://codereview.chromium.org/2263043002/diff/60001/android_webview/browser/DEPS File android_webview/browser/DEPS (right): https://codereview.chromium.org/2263043002/diff/60001/android_webview/browser/DEPS#newcode47 android_webview/browser/DEPS:47: "+ui/touch_selection/touch_handle.h", On 2016/08/26 04:15:44, boliu wrote: > I ...
4 years, 3 months ago (2016-08-26 09:21:19 UTC) #19
boliu
https://codereview.chromium.org/2263043002/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2263043002/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode164 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:164: if (contentViewCore == null) return null; umm, after this ...
4 years, 3 months ago (2016-08-26 20:28:02 UTC) #20
Jinsuk Kim
https://codereview.chromium.org/2263043002/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2263043002/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode164 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:164: if (contentViewCore == null) return null; On 2016/08/26 20:28:02, ...
4 years, 3 months ago (2016-08-26 22:50:50 UTC) #21
boliu
I meant the list in AwContents.. https://codereview.chromium.org/2263043002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2263043002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2698 android_webview/java/src/org/chromium/android_webview/AwContents.java:2698: if (drawable == ...
4 years, 3 months ago (2016-08-26 23:00:24 UTC) #22
Jinsuk Kim
PTAL https://codereview.chromium.org/2263043002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2263043002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2698 android_webview/java/src/org/chromium/android_webview/AwContents.java:2698: if (drawable == null) return 0L; On 2016/08/26 ...
4 years, 3 months ago (2016-08-26 23:52:44 UTC) #23
boliu
lgtm
4 years, 3 months ago (2016-08-26 23:56:08 UTC) #24
no sievers
content lgtm!
4 years, 3 months ago (2016-08-29 23:59:52 UTC) #25
Jinsuk Kim
mfomitchev@ could you review changes in android_webview/native/DEPS? I'd like an approval for depend-on path added ...
4 years, 3 months ago (2016-08-30 00:57:05 UTC) #27
mfomitchev
rubber stamp LGTM for android_webview/native/DEPS
4 years, 3 months ago (2016-08-30 15:33:48 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2263043002/180001
4 years, 3 months ago (2016-08-31 02:21:47 UTC) #44
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years, 3 months ago (2016-08-31 02:26:49 UTC) #46
commit-bot: I haz the power
4 years, 3 months ago (2016-08-31 02:28:33 UTC) #48
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5356a1399fdc2e940db8553788ed2c540e5abe68
Cr-Commit-Position: refs/heads/master@{#415542}

Powered by Google App Engine
This is Rietveld 408576698