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

Unified Diff: ui/events/event.cc

Issue 999423003: Set the unique_event_id when converting from TouchEvent to WebTouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index f0804d871cd9ad9790dcdbbb3af924e42e3cc32a..d2f63ac59d00de95e5b1cf0ab58c20bd41e37c0b 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -110,8 +110,13 @@ bool X11EventHasNonStandardState(const base::NativeEvent& event) {
#endif
}
-unsigned long long get_next_touch_event_id() {
- static unsigned long long id = 0;
+uint64 get_next_touch_event_id() {
+ // Set the first touch_event_id to 1 because we set id to 0 for other types
+ // of events.
+ static uint64 id = 1;
+ if (id==0)
+ id++;
+ DCHECK_NE(id, 0UL);
return id++;
}

Powered by Google App Engine
This is Rietveld 408576698