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

Unified Diff: content/browser/renderer_host/input/synthetic_tap_gesture.h

Issue 119323007: Add timestamps to synthesized events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove target variables in pinch; fix computation of total duration. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_tap_gesture.h
diff --git a/content/browser/renderer_host/input/synthetic_tap_gesture.h b/content/browser/renderer_host/input/synthetic_tap_gesture.h
index 22217f990901fdd33bfd6f986ce1da895356c56a..e67d1984d98a2dff53674b0c92544ed4bce63d69 100644
--- a/content/browser/renderer_host/input/synthetic_tap_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_tap_gesture.h
@@ -19,7 +19,8 @@ class CONTENT_EXPORT SyntheticTapGesture : public SyntheticGesture {
virtual ~SyntheticTapGesture();
virtual SyntheticGesture::Result ForwardInputEvents(
- const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE;
+ const base::TimeTicks& timestamp,
+ SyntheticGestureTarget* target) OVERRIDE;
private:
enum GestureState {
@@ -29,14 +30,17 @@ class CONTENT_EXPORT SyntheticTapGesture : public SyntheticGesture {
DONE
};
- void ForwardTouchOrMouseInputEvents(const base::TimeDelta& interval,
+ void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp,
SyntheticGestureTarget* target);
- void Press(SyntheticGestureTarget* target);
- void Release(SyntheticGestureTarget* target);
+ void Press(SyntheticGestureTarget* target, const base::TimeTicks& timestamp);
+ void Release(SyntheticGestureTarget* target,
+ const base::TimeTicks& timestamp);
+
+ base::TimeDelta GetDuration() const;
SyntheticTapGestureParams params_;
- base::TimeDelta total_waiting_time_;
+ base::TimeTicks start_time_;
SyntheticWebTouchEvent touch_event_;
SyntheticGestureParams::GestureSourceType gesture_source_type_;
GestureState state_;

Powered by Google App Engine
This is Rietveld 408576698