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

Unified Diff: content/browser/renderer_host/web_input_event_aurawin.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: content/browser/renderer_host/web_input_event_aurawin.cc
diff --git a/content/browser/renderer_host/web_input_event_aurawin.cc b/content/browser/renderer_host/web_input_event_aurawin.cc
index 0cb36dff27a803b79807af9ef081394b5cecbd17..6b3260a59d98027ebc9194d7c9639c874fa01d3b 100644
--- a/content/browser/renderer_host/web_input_event_aurawin.cc
+++ b/content/browser/renderer_host/web_input_event_aurawin.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/time/time.h"
#include "content/browser/renderer_host/input/web_input_event_builders_win.h"
+#include "ui/events/base_event_utils.h"
namespace content {
@@ -16,33 +17,35 @@ namespace content {
blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
const base::NativeEvent& native_event,
- const base::TimeDelta& time_stamp,
+ const base::TimeTicks& time_stamp,
blink::WebPointerProperties::PointerType pointer_type) {
return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message,
native_event.wParam, native_event.lParam,
- time_stamp.InSecondsF(), pointer_type);
+ ui::EventTimeStampToSeconds(time_stamp),
+ pointer_type);
}
blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent(
const base::NativeEvent& native_event,
- const base::TimeDelta& time_stamp,
+ const base::TimeTicks& time_stamp,
blink::WebPointerProperties::PointerType pointer_type) {
return WebMouseWheelEventBuilder::Build(
native_event.hwnd, native_event.message, native_event.wParam,
- native_event.lParam, time_stamp.InSecondsF(), pointer_type);
+ native_event.lParam, ui::EventTimeStampToSeconds(time_stamp),
+ pointer_type);
}
blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
const base::NativeEvent& native_event,
- const base::TimeDelta& time_stamp) {
+ const base::TimeTicks& time_stamp) {
return WebKeyboardEventBuilder::Build(
native_event.hwnd, native_event.message, native_event.wParam,
- native_event.lParam, time_stamp.InSecondsF());
+ native_event.lParam, ui::EventTimeStampToSeconds(time_stamp));
}
blink::WebGestureEvent MakeWebGestureEventFromNativeEvent(
const base::NativeEvent& native_event,
- const base::TimeDelta& time_stamp) {
+ const base::TimeTicks& time_stamp) {
// TODO: Create gestures from native event.
NOTIMPLEMENTED();
return blink::WebGestureEvent();

Powered by Google App Engine
This is Rietveld 408576698