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

Unified Diff: ui/base/events/event.cc

Issue 12088015: Add ability for EventGenerator to generate Scroll events asynchronously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Free any leftover events in destructor Created 7 years, 11 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/base/events/event.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event.cc
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index cffc21f7767e6fe5281a99ece577572bd49d1455..c06b6046b72742f7e74112865ed623dac099717b 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -640,12 +640,16 @@ ScrollEvent::ScrollEvent(const base::NativeEvent& native_event)
ScrollEvent::ScrollEvent(EventType type,
const gfx::Point& location,
+ base::TimeDelta time_stamp,
int flags,
float x_offset,
- float y_offset)
+ float y_offset,
+ int finger_count)
: MouseEvent(type, location, location, flags),
x_offset_(x_offset),
- y_offset_(y_offset) {
+ y_offset_(y_offset),
+ finger_count_(finger_count) {
+ set_time_stamp(time_stamp);
CHECK(IsScrollEvent());
}
@@ -664,7 +668,11 @@ GestureEvent::GestureEvent(EventType type,
base::TimeDelta time_stamp,
const GestureEventDetails& details,
unsigned int touch_ids_bitfield)
- : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), time_stamp, flags),
+ : LocatedEvent(type,
+ gfx::Point(x, y),
+ gfx::Point(x, y),
+ time_stamp,
+ flags | EF_FROM_TOUCH),
details_(details),
touch_ids_bitfield_(touch_ids_bitfield) {
}
« no previous file with comments | « ui/base/events/event.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698