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

Unified Diff: ui/platform_window/android/platform_window_android.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: ui/platform_window/android/platform_window_android.cc
diff --git a/ui/platform_window/android/platform_window_android.cc b/ui/platform_window/android/platform_window_android.cc
index a922a8b2cbab666dc640f5baf4e9b8c4bbe43859..dbda6a9f69cfb28939b31694a3e49b2dae7452f8 100644
--- a/ui/platform_window/android/platform_window_android.cc
+++ b/ui/platform_window/android/platform_window_android.cc
@@ -122,9 +122,10 @@ bool PlatformWindowAndroid::TouchEvent(JNIEnv* env,
ui::EventType event_type = MotionEventActionToEventType(masked_action);
if (event_type == ui::ET_UNKNOWN)
return false;
- ui::TouchEvent touch(event_type, gfx::Point(), ui::EF_NONE, pointer_id,
- base::TimeDelta::FromMilliseconds(time_ms), touch_major,
- touch_minor, orientation, pressure);
+ ui::TouchEvent touch(
+ event_type, gfx::Point(), ui::EF_NONE, pointer_id,
+ base::TimeTicks() + base::TimeDelta::FromMilliseconds(time_ms),
+ touch_major, touch_minor, orientation, pressure);
touch.set_location_f(gfx::PointF(x, y));
touch.set_root_location_f(gfx::PointF(x, y));
delegate_->DispatchEvent(&touch);
« no previous file with comments | « ui/message_center/views/notification_view_unittest.cc ('k') | ui/views/controls/button/custom_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698