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

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
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/event_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 1ca065943948cb6f53211c155ddb61ec9608abbe..201e7d6393b65577b5044b70ccbdfe6d9afd0107 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -15,6 +15,7 @@
#include "base/metrics/histogram.h"
#include "base/strings/stringprintf.h"
+#include "ui/events/base_event_utils.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/dom3/dom_code.h"
#include "ui/events/keycodes/dom3/dom_key.h"
@@ -110,11 +111,6 @@ bool X11EventHasNonStandardState(const base::NativeEvent& event) {
#endif
}
-unsigned long long get_next_touch_event_id() {
- static unsigned long long id = 0;
- return id++;
-}
-
} // namespace
namespace ui {
@@ -515,7 +511,7 @@ const int MouseWheelEvent::kWheelDelta = 53;
TouchEvent::TouchEvent(const base::NativeEvent& native_event)
: LocatedEvent(native_event),
touch_id_(GetTouchId(native_event)),
- unique_event_id_(get_next_touch_event_id()),
+ unique_event_id_(ui::GetNextTouchEventId()),
radius_x_(GetTouchRadiusX(native_event)),
radius_y_(GetTouchRadiusY(native_event)),
rotation_angle_(GetTouchAngle(native_event)),
@@ -538,7 +534,7 @@ TouchEvent::TouchEvent(EventType type,
base::TimeDelta time_stamp)
: LocatedEvent(type, location, location, time_stamp, 0),
touch_id_(touch_id),
- unique_event_id_(get_next_touch_event_id()),
+ unique_event_id_(ui::GetNextTouchEventId()),
radius_x_(0.0f),
radius_y_(0.0f),
rotation_angle_(0.0f),
@@ -559,7 +555,7 @@ TouchEvent::TouchEvent(EventType type,
float force)
: LocatedEvent(type, location, location, time_stamp, flags),
touch_id_(touch_id),
- unique_event_id_(get_next_touch_event_id()),
+ unique_event_id_(ui::GetNextTouchEventId()),
radius_x_(radius_x),
radius_y_(radius_y),
rotation_angle_(angle),
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698