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

Issue 929333002: Adding synthetic touch/mouse drag [Part1] (Closed)

Created:
5 years, 10 months ago by ssid
Modified:
5 years, 10 months ago
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding synthetic touch/mouse drag [Part1] We have synthetic scroll. But this feature doesn’t work in google maps in desktop version. To move around the maps we need to use click and drag on mouse. This CL adds only the background functions for synthetic click and drag and unittests. feature for telemety tests. In case of touch screens, the drag is identical to synthetic scroll already implemented, except for adding slop. The functions of class synthetic_smooth_scroll_gesture is moved to synthetic_smooth_move_gesture, with additional features of drag drop. Classes synthetic_smooth_scroll_gesture and synthetic_smooth_drag_gesture use the features with an instance of synthetic_smooth_move_gesture. In the next CLs The API and javascript interfaces will be added. BUG=457148 Committed: https://crrev.com/f50c67c1a5cab48b314a66cb9aa33c610b985990 Cr-Commit-Position: refs/heads/master@{#318071}

Patch Set 1 #

Patch Set 2 : Refcatoring #

Patch Set 3 : Refactoring #

Patch Set 4 : Refactoring #

Patch Set 5 : Refactoring #

Patch Set 6 : Fixing build error. #

Patch Set 7 : Fixing build error. #

Patch Set 8 : Fixing errors. #

Total comments: 18

Patch Set 9 : Addressed comments. #

Patch Set 10 : Formatting changes. #

Patch Set 11 : Same as 10 #

Total comments: 1

Patch Set 12 : Fixing nits #

Patch Set 13 : More nits #

Total comments: 59

Patch Set 14 : Splitting CL and adding unittests. #

Total comments: 10

Patch Set 15 : Added more unittests #

Patch Set 16 : Fixed nits. #

Total comments: 21

Patch Set 17 : Fixing build errors. #

Total comments: 21

Patch Set 18 : Addressed few comments. #

Total comments: 20

Patch Set 19 : Addressed comments. #

Total comments: 10

Patch Set 20 : Adderessed comments. #

Total comments: 13

Patch Set 21 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+851 lines, -594 lines) Patch
M content/browser/renderer_host/input/synthetic_gesture.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 22 chunks +365 lines, -146 lines 0 comments Download
A content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +38 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +57 lines, -0 lines 0 comments Download
A + content/browser/renderer_host/input/synthetic_smooth_move_gesture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +54 lines, -27 lines 0 comments Download
A + content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +202 lines, -98 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +9 lines, -62 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +36 lines, -247 lines 0 comments Download
M content/common/input/input_param_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -0 lines 0 comments Download
M content/common/input/input_param_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -1 line 0 comments Download
M content/common/input/synthetic_gesture_params.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + content/common/input/synthetic_smooth_drag_gesture_params.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -13 lines 0 comments Download
A content/common/input/synthetic_smooth_drag_gesture_params.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +43 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (8 generated)
ssid
Please take a look at this design.
5 years, 10 months ago (2015-02-17 15:19:45 UTC) #2
Sami
I think functionally this looks great, but the class hierarchy is a little too tightly ...
5 years, 10 months ago (2015-02-18 12:01:54 UTC) #3
ssid
PTAL. https://codereview.chromium.org/929333002/diff/140001/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h File content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h (right): https://codereview.chromium.org/929333002/diff/140001/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h#newcode20 content/browser/renderer_host/input/synthetic_smooth_drag_gesture.h:20: SyntheticGesture::Result ForwardInputEvents( On 2015/02/18 12:01:53, Sami wrote: > ...
5 years, 10 months ago (2015-02-18 17:57:35 UTC) #6
picksi
Looks good! Some nits and thoughts. I defer to Sami's judgement on this if we ...
5 years, 10 months ago (2015-02-19 11:50:19 UTC) #8
Sami
Thanks, I think this looks pretty clean now. Some more comments below. https://codereview.chromium.org/929333002/diff/240001/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc ...
5 years, 10 months ago (2015-02-19 11:59:06 UTC) #9
ssid
Added unittests and split the CL. PTAL. https://codereview.chromium.org/929333002/diff/240001/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc (right): https://codereview.chromium.org/929333002/diff/240001/content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc#newcode11 content/browser/renderer_host/input/synthetic_smooth_drag_gesture.cc:11: : drag_setup_(false), ...
5 years, 10 months ago (2015-02-20 10:58:56 UTC) #10
picksi
Looks good. I still think you could go a bit further with some of the ...
5 years, 10 months ago (2015-02-20 11:51:19 UTC) #11
petrcermak
Just a few of comments. https://codereview.chromium.org/929333002/diff/260001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc (right): https://codereview.chromium.org/929333002/diff/260001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc#newcode186 content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc:186: // Fall through to ...
5 years, 10 months ago (2015-02-20 12:21:09 UTC) #12
ssid
Thanks for the comments, PTAL. https://codereview.chromium.org/929333002/diff/260001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc (right): https://codereview.chromium.org/929333002/diff/260001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc#newcode186 content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc:186: // Fall through to ...
5 years, 10 months ago (2015-02-20 15:58:30 UTC) #13
picksi
Looks like loads of duplicated code! https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode648 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:648: scroll_target->start_to_end_distance()); Calling this ...
5 years, 10 months ago (2015-02-20 16:34:11 UTC) #14
Sami
The drag & scroll implementations look pretty good now. I think the unit tests need ...
5 years, 10 months ago (2015-02-20 17:57:07 UTC) #15
Sami
Hey Jared, ignoring the unit tests for now, what do you think of the overall ...
5 years, 10 months ago (2015-02-20 17:58:28 UTC) #17
ssid
Changes in unittests will be done. https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode610 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:610: SyntheticSmoothScrollGestureParams params, On ...
5 years, 10 months ago (2015-02-20 18:48:17 UTC) #18
jdduke (slow)
On 2015/02/20 17:58:28, Sami wrote: > Hey Jared, ignoring the unit tests for now, what ...
5 years, 10 months ago (2015-02-20 20:29:19 UTC) #19
ssid
Changed Unittests. PTAL. https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/300001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode397 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:397: class SyntheticGestureControllerTestUtility { On 2015/02/20 17:57:07, ...
5 years, 10 months ago (2015-02-23 11:40:32 UTC) #20
picksi
Some bikeshedding thoughts for you! https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode615 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:615: if (GetParam() == TOUCH_SCROLL) ...
5 years, 10 months ago (2015-02-23 12:22:25 UTC) #22
ssid
https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode615 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:615: if (GetParam() == TOUCH_SCROLL) { On 2015/02/23 12:22:24, picksi ...
5 years, 10 months ago (2015-02-23 14:03:04 UTC) #23
picksi
Thanks! A couple of new comments to discuss. https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode663 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:663: if ...
5 years, 10 months ago (2015-02-23 14:24:27 UTC) #24
Sami
Thanks Siddhartha. The test looks pretty neat now. https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode663 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:663: if ...
5 years, 10 months ago (2015-02-23 18:03:28 UTC) #25
ssid
Thanks for the comments. PTAL. https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc (right): https://codereview.chromium.org/929333002/diff/340001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc#newcode108 content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc:108: if (!params_.prevent_slop) On 2015/02/23 ...
5 years, 10 months ago (2015-02-23 19:10:36 UTC) #26
picksi
Looks good!
5 years, 10 months ago (2015-02-24 11:32:06 UTC) #27
petrcermak
Just a couple of nits... https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode460 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:460: target_ = NULL; Shouldn't ...
5 years, 10 months ago (2015-02-24 11:47:33 UTC) #28
Sami
Neat, just one question about a unit test. https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode769 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:769: if ...
5 years, 10 months ago (2015-02-24 12:10:17 UTC) #29
ssid
https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode769 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:769: if (GetParam() == TOUCH_DRAG) { On 2015/02/24 12:10:17, Sami ...
5 years, 10 months ago (2015-02-24 12:13:02 UTC) #30
Sami
Thanks, lgtm, but please address the comments from other reviewers too. https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): ...
5 years, 10 months ago (2015-02-24 13:03:43 UTC) #31
ssid
jdduke@ Please take a look. Thanks. https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/929333002/diff/380001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode460 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:460: target_ = NULL; ...
5 years, 10 months ago (2015-02-24 18:40:20 UTC) #32
jdduke (slow)
Looks good for the most part. https://codereview.chromium.org/929333002/diff/400001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc (right): https://codereview.chromium.org/929333002/diff/400001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc#newcode76 content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc:76: // TODO(ssid): Clean ...
5 years, 10 months ago (2015-02-25 15:58:25 UTC) #33
ssid
Addressed comments. PTAL https://codereview.chromium.org/929333002/diff/400001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc (right): https://codereview.chromium.org/929333002/diff/400001/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc#newcode195 content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc:195: // Fall through to forward the ...
5 years, 10 months ago (2015-02-25 16:25:42 UTC) #34
jdduke (slow)
lgtm, but the description isn't entirely accurate. For touchscreens, drag is similar to scroll but ...
5 years, 10 months ago (2015-02-25 16:40:47 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929333002/420001
5 years, 10 months ago (2015-02-25 17:39:18 UTC) #38
commit-bot: I haz the power
Committed patchset #21 (id:420001)
5 years, 10 months ago (2015-02-25 17:43:28 UTC) #39
commit-bot: I haz the power
5 years, 10 months ago (2015-02-25 17:44:20 UTC) #40
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/f50c67c1a5cab48b314a66cb9aa33c610b985990
Cr-Commit-Position: refs/heads/master@{#318071}

Powered by Google App Engine
This is Rietveld 408576698