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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_android.cc

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_gesture_target_android.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
index cf5181ab93c9240e02d4164525b7ff28537fbc95..6139f67635c181e98663643aec69fd9350d1aa7a 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
@@ -37,9 +37,10 @@ void SyntheticGestureTargetAndroid::TouchSetPointer(
}
void SyntheticGestureTargetAndroid::TouchInject(
- JNIEnv* env, Action action, int pointer_count) {
+ JNIEnv* env, Action action, int pointer_count, long time_in_ms) {
Java_TouchEventSynthesizer_inject(env, touch_event_synthesizer_.obj(),
- static_cast<int>(action), pointer_count);
+ static_cast<int>(action), pointer_count,
+ time_in_ms);
}
void SyntheticGestureTargetAndroid::DispatchWebTouchEventToPlatform(
@@ -70,7 +71,8 @@ void SyntheticGestureTargetAndroid::DispatchWebTouchEventToPlatform(
TouchSetPointer(env, i, point->position.x, point->position.y, point->id);
}
- TouchInject(env, action, num_touches);
+ TouchInject(env, action, num_touches,
+ static_cast<long>(web_touch.timeStampSeconds * 1000.0));
}
SyntheticGestureParams::GestureSourceType

Powered by Google App Engine
This is Rietveld 408576698