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

Unified Diff: ui/views/win/hwnd_message_handler.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: Fix gesture recognizer tests Created 4 years, 7 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/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index e98ba078a14388ae916e5f800cea879623fcc698..033f5315b400006298f8aa99d9892a2c0c467e7c 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -2183,12 +2183,11 @@ LRESULT HWNDMessageHandler::OnTouchEvent(UINT message,
gfx::Point touch_point(point.x, point.y);
unsigned int touch_id = id_generator_.GetGeneratedID(input[i].dwID);
- base::TimeDelta time_delta = event_time - base::TimeTicks();
if (input[i].dwFlags & TOUCHEVENTF_DOWN) {
touch_ids_.insert(input[i].dwID);
GenerateTouchEvent(ui::ET_TOUCH_PRESSED, touch_point, touch_id,
- event_time, time_delta, &touch_events);
+ event_time, &touch_events);
touch_down_contexts_++;
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
@@ -2198,13 +2197,13 @@ LRESULT HWNDMessageHandler::OnTouchEvent(UINT message,
} else {
if (input[i].dwFlags & TOUCHEVENTF_MOVE) {
GenerateTouchEvent(ui::ET_TOUCH_MOVED, touch_point, touch_id,
- event_time, time_delta, &touch_events);
+ event_time, &touch_events);
}
if (input[i].dwFlags & TOUCHEVENTF_UP) {
touch_ids_.erase(input[i].dwID);
GenerateTouchEvent(ui::ET_TOUCH_RELEASED, touch_point, touch_id,
- event_time, time_delta, &touch_events);
+ event_time, &touch_events);
id_generator_.ReleaseNumber(input[i].dwID);
}
}
@@ -2557,8 +2556,7 @@ void HWNDMessageHandler::PerformDwmTransition() {
void HWNDMessageHandler::GenerateTouchEvent(ui::EventType event_type,
const gfx::Point& point,
unsigned int id,
- base::TimeTicks event_time,
- base::TimeDelta time_stamp,
+ base::TimeTicks time_stamp,
TouchEvents* touch_events) {
ui::TouchEvent event(event_type, point, id, time_stamp);
@@ -2568,7 +2566,7 @@ void HWNDMessageHandler::GenerateTouchEvent(ui::EventType event_type,
ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
0,
0,
- event_time,
+ time_stamp,
1);
touch_events->push_back(event);

Powered by Google App Engine
This is Rietveld 408576698