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

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

Issue 252963002: Revert of Touch emulator: overwrite timestamps from mouse event with current time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/touch_emulator.cc
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
index ac000eb31a19b5f7f0edcb290517f44ea7e6e658..42b43106c7861847092ca29d19443a0b0cdce726 100644
--- a/content/browser/renderer_host/input/touch_emulator.cc
+++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -316,7 +316,7 @@
client_->ForwardGestureEvent(pinch_event_);
}
-void TouchEmulator::FillPinchEvent(const WebGestureEvent& event) {
+void TouchEmulator::FillPinchEvent(const WebInputEvent& event) {
pinch_event_.timeStampSeconds = event.timeStampSeconds;
pinch_event_.modifiers = event.modifiers;
pinch_event_.sourceDevice = blink::WebGestureEvent::Touchscreen;
@@ -360,16 +360,6 @@
touch_event_.modifiers = mouse_event.modifiers;
WebTouchEventTraits::ResetTypeAndTouchStates(
eventType, mouse_event.timeStampSeconds, &touch_event_);
-
- // On some platforms mouse event's timestamp does not necessarily relate to
- // the system time at all, so use base::TimeTicks::HighResNow() if possible,
- // or base::TimeTicks::Now() otherwise.
- base::TimeTicks now;
- if (base::TimeTicks::IsHighResNowFastAndReliable())
- now = base::TimeTicks::HighResNow();
- else
- now = base::TimeTicks::Now();
- touch_event_.timeStampSeconds = (now - base::TimeTicks()).InSecondsF();
WebTouchPoint& point = touch_event_.touches[0];
point.id = 0;
« no previous file with comments | « content/browser/renderer_host/input/touch_emulator.h ('k') | content/browser/renderer_host/input/touch_emulator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698