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

Unified Diff: ui/events/event_utils.h

Issue 2007083002: Validate that ui::Event::time_stamp comes from the same clock as TimeTicks::Now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@453559-use-timeticks-ui-event
Patch Set: Address feedback Created 4 years, 6 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
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_utils.h
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h
index bc8906ceceecd9b7672b5736b3f7ba4a18b0a573..183bf1be4b1a02e7e3d4ab1fdb352a2eb4f97931 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -13,6 +13,7 @@
#include "base/strings/string16.h"
#include "build/build_config.h"
#include "ui/display/display.h"
+#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/events_export.h"
@@ -57,10 +58,10 @@ EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
EVENTS_EXPORT base::TimeTicks EventTimeFromNative(
const base::NativeEvent& native_event);
-// Create a timestamp based on the current time.
-// TODO(majidvp): Get rid of this in favor of call to TimeTicks::Now().
-// crbug.com/453559
-EVENTS_EXPORT base::TimeTicks EventTimeForNow();
+// Ensures that the event timestamp values are coming from the same underlying
+// monotonic clock as base::TimeTicks::Now() and if it is not then falls
+// back to using the current ticks for event timestamp.
+EVENTS_EXPORT void ValidateEventTimeClock(base::TimeTicks* timestamp);
// Get the location from a native event. The coordinate system of the resultant
// |Point| has the origin at top-left of the "root window". The nature of
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698