| Index: third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| index 223203efa88ccbaf46cd124052b2a0d4a884766e..025abea4f3a05787702d0fc6b9b0cf76221c1b33 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| @@ -43,6 +43,7 @@
|
| #include "platform/geometry/IntRect.h"
|
| #include "platform/geometry/IntSize.h"
|
| #include "wtf/CurrentTime.h"
|
| +#include "wtf/Time.h"
|
|
|
| namespace {
|
|
|
| @@ -71,15 +72,16 @@ unsigned GetEventModifiers(int modifiers) {
|
| // is an estimate because these two clocks respond differently to user setting
|
| // time and NTP adjustments. If timestamp is empty then returns current
|
| // monotonic timestamp.
|
| -double GetEventTimeStamp(const blink::protocol::Maybe<double>& timestamp) {
|
| +TimeTicks GetEventTimeStamp(const blink::protocol::Maybe<double>& timestamp) {
|
| // Take a snapshot of difference between two clocks on first run and use it
|
| // for the duration of the application.
|
| static double epochToMonotonicTimeDelta =
|
| currentTime() - monotonicallyIncreasingTime();
|
| - if (timestamp.isJust())
|
| - return timestamp.fromJust() - epochToMonotonicTimeDelta;
|
| -
|
| - return monotonicallyIncreasingTime();
|
| + if (timestamp.isJust()) {
|
| + double ticksInSeconds = timestamp.fromJust() - epochToMonotonicTimeDelta;
|
| + return TimeTicks::FromSeconds(ticksInSeconds);
|
| + }
|
| + return TimeTicks::Now();
|
| }
|
|
|
| class SyntheticInspectorTouchPoint : public blink::PlatformTouchPoint {
|
| @@ -106,7 +108,7 @@ class SyntheticInspectorTouchEvent : public blink::PlatformTouchEvent {
|
| public:
|
| SyntheticInspectorTouchEvent(const blink::PlatformEvent::EventType type,
|
| unsigned modifiers,
|
| - double timestamp) {
|
| + TimeTicks timestamp) {
|
| m_type = type;
|
| m_modifiers = modifiers;
|
| m_timestamp = timestamp;
|
|
|