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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/web_input_event_aura.h" 5 #include "content/browser/renderer_host/web_input_event_aura.h"
6 6
7 #include "base/event_types.h" 7 #include "base/event_types.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/renderer_host/input/web_input_event_builders_win.h" 10 #include "content/browser/renderer_host/input/web_input_event_builders_win.h"
11 #include "ui/events/base_event_utils.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 // On Windows, we can just use the builtin WebKit factory methods to fully 15 // On Windows, we can just use the builtin WebKit factory methods to fully
15 // construct our pre-translated events. 16 // construct our pre-translated events.
16 17
17 blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( 18 blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
18 const base::NativeEvent& native_event, 19 const base::NativeEvent& native_event,
19 const base::TimeDelta& time_stamp, 20 const base::TimeTicks& time_stamp,
20 blink::WebPointerProperties::PointerType pointer_type) { 21 blink::WebPointerProperties::PointerType pointer_type) {
21 return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message, 22 return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message,
22 native_event.wParam, native_event.lParam, 23 native_event.wParam, native_event.lParam,
23 time_stamp.InSecondsF(), pointer_type); 24 ui::EventTimeStampToSeconds(time_stamp),
25 pointer_type);
24 } 26 }
25 27
26 blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( 28 blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent(
27 const base::NativeEvent& native_event, 29 const base::NativeEvent& native_event,
28 const base::TimeDelta& time_stamp, 30 const base::TimeTicks& time_stamp,
29 blink::WebPointerProperties::PointerType pointer_type) { 31 blink::WebPointerProperties::PointerType pointer_type) {
30 return WebMouseWheelEventBuilder::Build( 32 return WebMouseWheelEventBuilder::Build(
31 native_event.hwnd, native_event.message, native_event.wParam, 33 native_event.hwnd, native_event.message, native_event.wParam,
32 native_event.lParam, time_stamp.InSecondsF(), pointer_type); 34 native_event.lParam, ui::EventTimeStampToSeconds(time_stamp),
35 pointer_type);
33 } 36 }
34 37
35 blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( 38 blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent(
36 const base::NativeEvent& native_event, 39 const base::NativeEvent& native_event,
37 const base::TimeDelta& time_stamp) { 40 const base::TimeTicks& time_stamp) {
38 return WebKeyboardEventBuilder::Build( 41 return WebKeyboardEventBuilder::Build(
39 native_event.hwnd, native_event.message, native_event.wParam, 42 native_event.hwnd, native_event.message, native_event.wParam,
40 native_event.lParam, time_stamp.InSecondsF()); 43 native_event.lParam, ui::EventTimeStampToSeconds(time_stamp));
41 } 44 }
42 45
43 blink::WebGestureEvent MakeWebGestureEventFromNativeEvent( 46 blink::WebGestureEvent MakeWebGestureEventFromNativeEvent(
44 const base::NativeEvent& native_event, 47 const base::NativeEvent& native_event,
45 const base::TimeDelta& time_stamp) { 48 const base::TimeTicks& time_stamp) {
46 // TODO: Create gestures from native event. 49 // TODO: Create gestures from native event.
47 NOTIMPLEMENTED(); 50 NOTIMPLEMENTED();
48 return blink::WebGestureEvent(); 51 return blink::WebGestureEvent();
49 } 52 }
50 53
51 } // namespace content 54 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698