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

Issue 2645353004: ViewRoot class for event forwarding on Android (Closed)

Created:
3 years, 11 months ago by Jinsuk Kim
Modified:
3 years, 10 months ago
Reviewers:
boliu
CC:
chromium-reviews, jam, darin-cc_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ViewRoot class for event forwarding on Android This CL introduces a new interface ViewRoot to forward Java view/input events down to native with a view to replacing the flow through ContentViewCore eventually. In native side, ViewRoot is a subclass of ViewAndroid. It acts as the root of a ViewAndroid tree, and receives touch/view events from embedders. It has a reference to WindowAndroid, and partially takes over the role it played as the tree root. ViewRoot is mapped 1:1 to WindowAndroid and shared across all the contents. WebView is an exception where all activities share the WA instance. ViewRoot, ViewAndroid, and ViewClient are put together to adopt the pattern "chain of responsibility" dispatching the events to the classes implementing |ViewClient| along the view hierarchy, and conditionally stopping the processing when required. ViewRoot is not in use yet. In the follow-up patches it will replace WindowAndroid. This CL constructs ViewAndroid layout/bound that mirrors that of Android view in preparation for the upcoming changes. BUG=671401 Review-Url: https://codereview.chromium.org/2645353004 Cr-Commit-Position: refs/heads/master@{#448833} Committed: https://chromium.googlesource.com/chromium/src/+/a3d353091d8189530b26c905d6fb688b333fc819

Patch Set 1 : fix build #

Patch Set 2 : fix tests #

Total comments: 41

Patch Set 3 : comments #

Total comments: 4

Patch Set 4 : comments #

Total comments: 10

Patch Set 5 : no ui/display #

Total comments: 4

Patch Set 6 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+794 lines, -19 lines) Patch
M ui/android/BUILD.gn View 1 2 3 4 chunks +7 lines, -0 lines 0 comments Download
A ui/android/java/src/org/chromium/ui/base/ViewRoot.java View 1 2 1 chunk +104 lines, -0 lines 0 comments Download
M ui/android/ui_android_jni_registrar.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M ui/android/view_android.h View 1 2 3 4 5 6 chunks +35 lines, -5 lines 0 comments Download
M ui/android/view_android.cc View 1 2 3 4 5 5 chunks +70 lines, -14 lines 0 comments Download
A ui/android/view_android_unittest.cc View 1 2 3 1 chunk +167 lines, -0 lines 0 comments Download
A ui/android/view_client.h View 1 2 1 chunk +103 lines, -0 lines 0 comments Download
A ui/android/view_client.cc View 1 chunk +129 lines, -0 lines 0 comments Download
A ui/android/view_root.h View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
A ui/android/view_root.cc View 1 2 3 4 1 chunk +106 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (17 generated)
Jinsuk Kim
Note: MotionEventData is a temporary container of the info about touch/pinch events used while hit ...
3 years, 11 months ago (2017-01-24 08:42:08 UTC) #8
boliu
really need a design doc.. https://codereview.chromium.org/2645353004/diff/40001/ui/android/java/src/org/chromium/ui/base/ViewRoot.java File ui/android/java/src/org/chromium/ui/base/ViewRoot.java (right): https://codereview.chromium.org/2645353004/diff/40001/ui/android/java/src/org/chromium/ui/base/ViewRoot.java#newcode15 ui/android/java/src/org/chromium/ui/base/ViewRoot.java:15: public class ViewRoot { ...
3 years, 11 months ago (2017-01-24 23:47:13 UTC) #9
Jinsuk Kim
I can write a doc if the changes keep looking confusing. One thing I'd like ...
3 years, 11 months ago (2017-01-25 02:34:34 UTC) #10
boliu
On 2017/01/25 02:34:34, Jinsuk Kim wrote: > I can write a doc if the changes ...
3 years, 11 months ago (2017-01-25 02:45:24 UTC) #11
Jinsuk Kim
On 2017/01/25 02:45:24, boliu wrote: > On 2017/01/25 02:34:34, Jinsuk Kim wrote: > > I ...
3 years, 11 months ago (2017-01-25 08:13:21 UTC) #12
Jinsuk Kim
https://codereview.chromium.org/2645353004/diff/40001/ui/android/view_root.h File ui/android/view_root.h (right): https://codereview.chromium.org/2645353004/diff/40001/ui/android/view_root.h#newcode30 ui/android/view_root.h:30: void MoveToFront(ViewAndroid* child); On 2017/01/25 02:34:34, Jinsuk Kim wrote: ...
3 years, 11 months ago (2017-01-25 08:13:32 UTC) #13
boliu
https://codereview.chromium.org/2645353004/diff/60001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/60001/ui/android/view_android.cc#newcode100 ui/android/view_android.cc:100: children_.push_front(child); I think we should keep this push_back to ...
3 years, 10 months ago (2017-02-05 19:20:23 UTC) #14
Jinsuk Kim
https://codereview.chromium.org/2645353004/diff/60001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/60001/ui/android/view_android.cc#newcode100 ui/android/view_android.cc:100: children_.push_front(child); On 2017/02/05 19:20:23, boliu wrote: > I think ...
3 years, 10 months ago (2017-02-06 02:23:45 UTC) #15
boliu
https://codereview.chromium.org/2645353004/diff/80001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/80001/ui/android/view_android.cc#newcode82 ui/android/view_android.cc:82: child->parent_ = nullptr; call RemoveChild to avoid code duplication, ...
3 years, 10 months ago (2017-02-06 18:29:26 UTC) #16
Jinsuk Kim
https://codereview.chromium.org/2645353004/diff/80001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/80001/ui/android/view_android.cc#newcode82 ui/android/view_android.cc:82: child->parent_ = nullptr; On 2017/02/06 18:29:26, boliu wrote: > ...
3 years, 10 months ago (2017-02-06 23:51:33 UTC) #18
boliu
lgtm https://codereview.chromium.org/2645353004/diff/120001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/120001/ui/android/view_android.cc#newcode128 ui/android/view_android.cc:128: DCHECK(!match_parent || (origin_.IsOrigin() && size_.IsEmpty())); nit: DCHECK input ...
3 years, 10 months ago (2017-02-07 17:49:44 UTC) #19
Jinsuk Kim
https://codereview.chromium.org/2645353004/diff/120001/ui/android/view_android.cc File ui/android/view_android.cc (right): https://codereview.chromium.org/2645353004/diff/120001/ui/android/view_android.cc#newcode128 ui/android/view_android.cc:128: DCHECK(!match_parent || (origin_.IsOrigin() && size_.IsEmpty())); On 2017/02/07 17:49:44, boliu ...
3 years, 10 months ago (2017-02-07 23:22:22 UTC) #23
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/2645353004/140001
3 years, 10 months ago (2017-02-08 00:48:28 UTC) #28
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 01:25:18 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/a3d353091d8189530b26c905d6fb...

Powered by Google App Engine
This is Rietveld 408576698