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

Issue 1728193002: Support dragging texts into Android WebView. (Closed)

Created:
4 years, 10 months ago by hush (inactive)
Modified:
4 years, 5 months ago
CC:
android-webview-reviews_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dcheng, dglazkov+blink, jam, Vladislav Kaznacheev, nasko+codewatch_chromium.org, newt (away), 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

Support dragging texts into Android WebView. WebView gets callback 'onDragEvent' when something is dragged into the WebView. This CL extracts the texts (if any) and location from the DragEvent and creates DropData which is Chromium's internal representation of dragged data. The event plumbing path is WebView#onDragEvent --> AwContents#onDragEvent --> ContentViewCore --> WebContentsViewAndroid. This CL also uses a new blink::WebView API that performs dropping with DropData, because on Android, the DropData is only available when the drop is performed, not when the drag is started. BUG=584789 Committed: https://crrev.com/445de0ecb75960ee4060dfcfaf1a86e5632e4d0a Cr-Commit-Position: refs/heads/master@{#403417}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : review #

Total comments: 17

Patch Set 4 : address comments #

Patch Set 5 : gyp and gn #

Total comments: 6

Patch Set 6 : rebase onto https://codereview.chromium.org/1723763002/ #

Patch Set 7 : filter the data during drop #

Patch Set 8 : rebase onto https://codereview.chromium.org/1723763002/ #

Patch Set 9 : rebase #

Patch Set 10 : rebase on top of https://codereview.chromium.org/2080703004/ #

Patch Set 11 : remove dead includes #

Total comments: 8

Patch Set 12 : review #

Total comments: 6

Patch Set 13 : generate DragEvent JNI bindings and use the enums from JNI #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -4 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +62 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +28 lines, -0 lines 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +54 lines, -1 line 0 comments Download

Messages

Total messages: 58 (21 generated)
hush (inactive)
This is the first draft, built on top of https://codereview.chromium.org/1723763002/. This CL only cares about ...
4 years, 10 months ago (2016-02-24 03:36:20 UTC) #1
hush (inactive)
Hello sky@: PTAL ui/ tedchoc@: PTAL content/
4 years, 10 months ago (2016-02-24 23:40:37 UTC) #7
hush (inactive)
This is only the first step. WebView can accept drops from other views with this ...
4 years, 10 months ago (2016-02-24 23:47:05 UTC) #8
sky
LGTM https://codereview.chromium.org/1728193002/diff/100001/ui/base/dragdrop/os_exchange_data_provider_android.cc File ui/base/dragdrop/os_exchange_data_provider_android.cc (right): https://codereview.chromium.org/1728193002/diff/100001/ui/base/dragdrop/os_exchange_data_provider_android.cc#newcode100 ui/base/dragdrop/os_exchange_data_provider_android.cc:100: } nit: newline between 99/100 and add // ...
4 years, 10 months ago (2016-02-25 01:06:26 UTC) #9
dcheng
https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc#newcode1424 content/browser/android/content_view_core_impl.cc:1424: ui::OSExchangeData data(new ui::OSExchangeDataProviderAndroid()); Will there be a followup patch ...
4 years, 10 months ago (2016-02-25 01:18:49 UTC) #11
hush (inactive)
https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc#newcode1424 content/browser/android/content_view_core_impl.cc:1424: ui::OSExchangeData data(new ui::OSExchangeDataProviderAndroid()); On 2016/02/25 01:18:49, dcheng wrote: > ...
4 years, 10 months ago (2016-02-25 02:40:48 UTC) #13
hush (inactive)
sgurun: PTAL a_w/
4 years, 10 months ago (2016-02-25 02:41:07 UTC) #14
Ted C
+aelias (for input) and sievers (for WCVA) https://codereview.chromium.org/1728193002/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/1728193002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2980 android_webview/java/src/org/chromium/android_webview/AwContents.java:2980: ClipDescription clipDescription ...
4 years, 9 months ago (2016-02-25 18:38:53 UTC) #16
aelias_OOO_until_Jul13
https://codereview.chromium.org/1728193002/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/1728193002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2991 android_webview/java/src/org/chromium/android_webview/AwContents.java:2991: // TODO(hush): onPerformDrop should return false when the receiving ...
4 years, 9 months ago (2016-02-25 20:58:00 UTC) #17
dcheng
https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc#newcode1424 content/browser/android/content_view_core_impl.cc:1424: ui::OSExchangeData data(new ui::OSExchangeDataProviderAndroid()); On 2016/02/25 at 02:40:48, hush wrote: ...
4 years, 9 months ago (2016-02-25 21:13:38 UTC) #18
hush (inactive)
https://codereview.chromium.org/1728193002/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/1728193002/diff/120001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2980 android_webview/java/src/org/chromium/android_webview/AwContents.java:2980: ClipDescription clipDescription = event.getClipDescription(); On 2016/02/25 18:38:53, Ted C ...
4 years, 9 months ago (2016-02-27 01:46:14 UTC) #19
hush (inactive)
https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/100001/content/browser/android/content_view_core_impl.cc#newcode1424 content/browser/android/content_view_core_impl.cc:1424: ui::OSExchangeData data(new ui::OSExchangeDataProviderAndroid()); On 2016/02/25 21:13:38, dcheng wrote: > ...
4 years, 9 months ago (2016-02-27 01:47:22 UTC) #20
aelias_OOO_until_Jul13
https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h File content/public/browser/render_view_host.h (right): https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h#newcode149 content/public/browser/render_view_host.h:149: virtual void DragTargetDropWithData(const DropData& drop_data, On 2016/02/27 at 01:46:13, ...
4 years, 9 months ago (2016-02-27 01:54:41 UTC) #21
hush (inactive)
https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h File content/public/browser/render_view_host.h (right): https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h#newcode149 content/public/browser/render_view_host.h:149: virtual void DragTargetDropWithData(const DropData& drop_data, On 2016/02/27 01:54:41, aelias ...
4 years, 9 months ago (2016-02-29 18:27:41 UTC) #22
hush (inactive)
https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h File content/public/browser/render_view_host.h (right): https://codereview.chromium.org/1728193002/diff/120001/content/public/browser/render_view_host.h#newcode149 content/public/browser/render_view_host.h:149: virtual void DragTargetDropWithData(const DropData& drop_data, On 2016/02/29 18:27:41, hush ...
4 years, 9 months ago (2016-03-01 18:54:28 UTC) #23
hush (inactive)
4 years, 9 months ago (2016-03-01 18:55:19 UTC) #24
aelias_OOO_until_Jul13
https://codereview.chromium.org/1728193002/diff/160001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/1728193002/diff/160001/content/browser/renderer_host/render_view_host_impl.cc#newcode611 content/browser/renderer_host/render_view_host_impl.cc:611: DropData filtered_data(drop_data); There's a lot of code here to ...
4 years, 9 months ago (2016-03-01 19:57:33 UTC) #25
hush (inactive)
https://codereview.chromium.org/1728193002/diff/160001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/1728193002/diff/160001/content/browser/renderer_host/render_view_host_impl.cc#newcode611 content/browser/renderer_host/render_view_host_impl.cc:611: DropData filtered_data(drop_data); On 2016/03/01 19:57:32, aelias wrote: > There's ...
4 years, 9 months ago (2016-03-01 23:54:20 UTC) #27
hush (inactive)
Hello guys, I just rebased the CL. Thanks to the recent refactors, this CL is ...
4 years, 6 months ago (2016-06-24 03:22:00 UTC) #30
dcheng
https://codereview.chromium.org/1728193002/diff/340001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/340001/content/browser/android/content_view_core_impl.cc#newcode97 content/browser/android/content_view_core_impl.cc:97: ACTION_DRAG_STARTED = 1, Nit: enum class, and just call ...
4 years, 5 months ago (2016-06-24 23:07:53 UTC) #31
hush (inactive)
https://codereview.chromium.org/1728193002/diff/340001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/340001/content/browser/android/content_view_core_impl.cc#newcode97 content/browser/android/content_view_core_impl.cc:97: ACTION_DRAG_STARTED = 1, On 2016/06/24 23:07:53, dcheng wrote: > ...
4 years, 5 months ago (2016-06-27 19:01:54 UTC) #33
dcheng
LGTM
4 years, 5 months ago (2016-06-27 19:46:48 UTC) #34
hush (inactive)
Hi Ted, PTAL content/
4 years, 5 months ago (2016-06-27 20:06:59 UTC) #35
sgurun-gerrit only
On 2016/06/27 20:06:59, hush wrote: > Hi Ted, PTAL content/ aw lgtm
4 years, 5 months ago (2016-06-27 20:25:52 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1728193002/380001
4 years, 5 months ago (2016-06-27 20:48:53 UTC) #38
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 22:33:48 UTC) #40
hush (inactive)
On 2016/06/27 22:33:48, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 5 months ago (2016-06-28 20:29:18 UTC) #41
Ted C
lgtm...i think generating the enums would be nicer, but I'll leave that up to you ...
4 years, 5 months ago (2016-06-30 00:15:43 UTC) #42
hush (inactive)
https://codereview.chromium.org/1728193002/diff/380001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1728193002/diff/380001/content/browser/android/content_view_core_impl.cc#newcode99 content/browser/android/content_view_core_impl.cc:99: ACTION_DRAG_STARTED = 1, On 2016/06/30 00:15:42, Ted C wrote: ...
4 years, 5 months ago (2016-06-30 18:19:06 UTC) #43
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/1728193002/400001
4 years, 5 months ago (2016-06-30 18:21:27 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/29795)
4 years, 5 months ago (2016-06-30 18:25:44 UTC) #48
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/1728193002/400001
4 years, 5 months ago (2016-07-01 00:25:36 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/30071)
4 years, 5 months ago (2016-07-01 00:30:53 UTC) #52
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/1728193002/400001
4 years, 5 months ago (2016-07-01 06:48:32 UTC) #54
commit-bot: I haz the power
Committed patchset #13 (id:400001)
4 years, 5 months ago (2016-07-01 06:53:02 UTC) #55
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-01 06:53:07 UTC) #56
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 06:55:00 UTC) #58
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/445de0ecb75960ee4060dfcfaf1a86e5632e4d0a
Cr-Commit-Position: refs/heads/master@{#403417}

Powered by Google App Engine
This is Rietveld 408576698