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

Unified Diff: third_party/WebKit/Source/platform/PlatformEvent.h

Issue 2542693002: Use WTF::TimeTicks to represent timestamp in Platform/Core event types (Closed)
Patch Set: rebase Created 4 years 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: third_party/WebKit/Source/platform/PlatformEvent.h
diff --git a/third_party/WebKit/Source/platform/PlatformEvent.h b/third_party/WebKit/Source/platform/PlatformEvent.h
index 7133b03cc3c81b26edadc489c1a86942561defd7..943b01ff363f09eda97269c1a6c4e9ec4c8ce9c5 100644
--- a/third_party/WebKit/Source/platform/PlatformEvent.h
+++ b/third_party/WebKit/Source/platform/PlatformEvent.h
@@ -28,6 +28,7 @@
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
+#include "wtf/Time.h"
namespace blink {
@@ -138,15 +139,14 @@ class PlatformEvent {
Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); }
- double timestamp() const { return m_timestamp; }
+ TimeTicks timestamp() const { return m_timestamp; }
protected:
- PlatformEvent() : m_type(NoType), m_modifiers(), m_timestamp(0) {}
+ PlatformEvent() : m_type(NoType), m_modifiers() {}
- explicit PlatformEvent(EventType type)
- : m_type(type), m_modifiers(0), m_timestamp(0) {}
+ explicit PlatformEvent(EventType type) : m_type(type), m_modifiers(0) {}
- PlatformEvent(EventType type, Modifiers modifiers, double timestamp)
+ PlatformEvent(EventType type, Modifiers modifiers, TimeTicks timestamp)
: m_type(type), m_modifiers(modifiers), m_timestamp(timestamp) {}
// Explicit protected destructor so that people don't accidentally
@@ -155,7 +155,7 @@ class PlatformEvent {
unsigned m_type;
unsigned m_modifiers;
- double m_timestamp;
+ TimeTicks m_timestamp;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698