Index: ui/events/base_event_utils.cc |
diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d1d05d7cad5ab45d3e5debbb44072ee8f98060f9 |
--- /dev/null |
+++ b/ui/events/base_event_utils.cc |
@@ -0,0 +1,19 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/events/base_event_utils.h" |
+ |
+namespace ui { |
+ |
+uint64 GetNextTouchEventId() { |
+ // Set the first touch event ID to 1 because we set id to 0 for other types |
jdduke (slow)
2015/04/21 22:40:16
Should we be asserting that we're on the UI thread
lanwei
2015/04/22 20:51:31
Done.
|
+ // of events. |
+ static uint64 id = 1; |
+ if (id==0) |
+ id++; |
+ return id++; |
+} |
+ |
+} // namespace ui |
+ |