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

Issue 119323007: Add timestamps to synthesized events. (Closed)

Created:
6 years, 11 months ago by Dominik Grewe
Modified:
6 years, 11 months ago
Reviewers:
jdduke (slow)
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Add timestamps to synthesized events. With this CL, synthetic gestures add timestamps to the events they generate. This allows us to have timestamps that are not necessarily aligned to frame boundaries. The timestamps are converted to native timestamps by the synthetic gesture targets. The synthetic gesture controller passes timestamps instead of intervals to the gestures. BUG=297980 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243299

Patch Set 1 #

Patch Set 2 : Cleanup. #

Total comments: 18

Patch Set 3 : fix timestamp conversion; clean up pinch gesture; add DCHECKS #

Patch Set 4 : Use timestamp to compute delta. #

Total comments: 4

Patch Set 5 : same for pinch; nits #

Total comments: 4

Patch Set 6 : Nits. #

Patch Set 7 : Remove target variables in pinch; fix computation of total duration. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -205 lines) Patch
M content/browser/renderer_host/input/synthetic_gesture.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_controller.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_controller.cc View 2 chunks +2 lines, -15 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc View 1 2 8 chunks +14 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_android.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_android.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_pinch_gesture.h View 1 2 3 4 5 6 3 chunks +23 lines, -16 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_pinch_gesture.cc View 1 2 3 4 5 6 6 chunks +69 lines, -65 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h View 1 2 3 2 chunks +22 lines, -13 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc View 1 2 3 4 5 6 9 chunks +81 lines, -58 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_tap_gesture.h View 2 chunks +9 lines, -5 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_tap_gesture.cc View 6 chunks +20 lines, -11 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java View 1 2 8 chunks +11 lines, -13 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Dominik Grewe
This is my first attempt for adding timestamps to synthesized events. PTAL. The controller now ...
6 years, 11 months ago (2014-01-03 17:34:05 UTC) #1
jdduke (slow)
https://codereview.chromium.org/119323007/diff/30001/content/browser/renderer_host/input/synthetic_gesture.cc File content/browser/renderer_host/input/synthetic_gesture.cc (right): https://codereview.chromium.org/119323007/diff/30001/content/browser/renderer_host/input/synthetic_gesture.cc#newcode49 content/browser/renderer_host/input/synthetic_gesture.cc:49: return (timestamp - base::TimeTicks::UnixEpoch()).InSecondsF(); The documentation for WebInputEvent is ...
6 years, 11 months ago (2014-01-03 18:24:30 UTC) #2
Dominik Grewe
Thanks Jared. https://codereview.chromium.org/119323007/diff/30001/content/browser/renderer_host/input/synthetic_gesture.cc File content/browser/renderer_host/input/synthetic_gesture.cc (right): https://codereview.chromium.org/119323007/diff/30001/content/browser/renderer_host/input/synthetic_gesture.cc#newcode49 content/browser/renderer_host/input/synthetic_gesture.cc:49: return (timestamp - base::TimeTicks::UnixEpoch()).InSecondsF(); On 2014/01/03 18:24:30, ...
6 years, 11 months ago (2014-01-06 11:46:06 UTC) #3
Dominik Grewe
I've updated smooth scroll as we discussed. Please have a look. I think it's cleaner ...
6 years, 11 months ago (2014-01-06 18:46:50 UTC) #4
jdduke (slow)
lgtm with nits. We can do the same pinch refactor either in this or a ...
6 years, 11 months ago (2014-01-06 18:56:27 UTC) #5
Dominik Grewe
I've updated the pinch code. PTAL. https://codereview.chromium.org/119323007/diff/140001/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc File content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc (right): https://codereview.chromium.org/119323007/diff/140001/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc#newcode214 content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc:214: if (timestamp == ...
6 years, 11 months ago (2014-01-06 19:16:43 UTC) #6
jdduke (slow)
lgtm with nits. Thanks! https://codereview.chromium.org/119323007/diff/230001/content/browser/renderer_host/input/synthetic_pinch_gesture.cc File content/browser/renderer_host/input/synthetic_pinch_gesture.cc (right): https://codereview.chromium.org/119323007/diff/230001/content/browser/renderer_host/input/synthetic_pinch_gesture.cc#newcode155 content/browser/renderer_host/input/synthetic_pinch_gesture.cc:155: if (timestamp == stop_time_) if ...
6 years, 11 months ago (2014-01-06 21:41:14 UTC) #7
Dominik Grewe
Thanks Jared! I just fixed another small issue: The computation of |total_duration_in_us| for pinch involved ...
6 years, 11 months ago (2014-01-07 10:43:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/119323007/350001
6 years, 11 months ago (2014-01-07 13:19:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/119323007/350001
6 years, 11 months ago (2014-01-07 15:29:54 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-07 15:50:26 UTC) #11
Message was sent while issue was closed.
Change committed as 243299

Powered by Google App Engine
This is Rietveld 408576698