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

Side by Side Diff: ui/events/ozone/evdev/device_event_dispatcher_evdev.cc

Issue 889673004: ozone: evdev: Use kernel timestamps for mouse events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on MouseEvent timestamp changes & fix stime feedback Created 5 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/events/ozone/evdev/device_event_dispatcher_evdev.h" 5 #include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 KeyEventParams::KeyEventParams(int device_id, 9 KeyEventParams::KeyEventParams(int device_id,
10 unsigned int code, 10 unsigned int code,
11 bool down, 11 bool down,
12 base::TimeDelta timestamp) 12 base::TimeDelta timestamp)
13 : device_id(device_id), code(code), down(down), timestamp(timestamp) { 13 : device_id(device_id), code(code), down(down), timestamp(timestamp) {
14 } 14 }
15 15
16 KeyEventParams::KeyEventParams(const KeyEventParams& other) = default; 16 KeyEventParams::KeyEventParams(const KeyEventParams& other) = default;
17 17
18 KeyEventParams::~KeyEventParams() { 18 KeyEventParams::~KeyEventParams() {
19 } 19 }
20 20
21 MouseMoveEventParams::MouseMoveEventParams(int device_id, 21 MouseMoveEventParams::MouseMoveEventParams(int device_id,
22 const gfx::PointF& location) 22 const gfx::PointF& location,
23 : device_id(device_id), location(location) { 23 base::TimeDelta timestamp)
24 : device_id(device_id), location(location), timestamp(timestamp) {
24 } 25 }
25 26
26 MouseMoveEventParams::MouseMoveEventParams(const MouseMoveEventParams& other) = 27 MouseMoveEventParams::MouseMoveEventParams(const MouseMoveEventParams& other) =
27 default; 28 default;
28 29
29 MouseMoveEventParams::~MouseMoveEventParams() { 30 MouseMoveEventParams::~MouseMoveEventParams() {
30 } 31 }
31 32
32 MouseButtonEventParams::MouseButtonEventParams(int device_id, 33 MouseButtonEventParams::MouseButtonEventParams(int device_id,
33 const gfx::PointF& location, 34 const gfx::PointF& location,
34 unsigned int button, 35 unsigned int button,
35 bool down, 36 bool down,
36 bool allow_remap) 37 bool allow_remap,
38 base::TimeDelta timestamp)
37 : device_id(device_id), 39 : device_id(device_id),
38 location(location), 40 location(location),
39 button(button), 41 button(button),
40 down(down), 42 down(down),
41 allow_remap(allow_remap) { 43 allow_remap(allow_remap),
44 timestamp(timestamp) {
42 } 45 }
43 46
44 MouseButtonEventParams::MouseButtonEventParams( 47 MouseButtonEventParams::MouseButtonEventParams(
45 const MouseButtonEventParams& other) = default; 48 const MouseButtonEventParams& other) = default;
46 49
47 MouseButtonEventParams::~MouseButtonEventParams() { 50 MouseButtonEventParams::~MouseButtonEventParams() {
48 } 51 }
49 52
50 MouseWheelEventParams::MouseWheelEventParams(int device_id, 53 MouseWheelEventParams::MouseWheelEventParams(int device_id,
51 const gfx::PointF& location, 54 const gfx::PointF& location,
52 const gfx::Vector2d& delta) 55 const gfx::Vector2d& delta,
53 : device_id(device_id), location(location), delta(delta) { 56 base::TimeDelta timestamp)
57 : device_id(device_id),
58 location(location),
59 delta(delta),
60 timestamp(timestamp) {
54 } 61 }
55 62
56 MouseWheelEventParams::MouseWheelEventParams( 63 MouseWheelEventParams::MouseWheelEventParams(
57 const MouseWheelEventParams& other) = default; 64 const MouseWheelEventParams& other) = default;
58 65
59 MouseWheelEventParams::~MouseWheelEventParams() { 66 MouseWheelEventParams::~MouseWheelEventParams() {
60 } 67 }
61 68
62 ScrollEventParams::ScrollEventParams(int device_id, 69 ScrollEventParams::ScrollEventParams(int device_id,
63 EventType type, 70 EventType type,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 pressure(pressure), 102 pressure(pressure),
96 timestamp(timestamp) { 103 timestamp(timestamp) {
97 } 104 }
98 105
99 TouchEventParams::TouchEventParams(const TouchEventParams& other) = default; 106 TouchEventParams::TouchEventParams(const TouchEventParams& other) = default;
100 107
101 TouchEventParams::~TouchEventParams() { 108 TouchEventParams::~TouchEventParams() {
102 } 109 }
103 110
104 } // namspace ui 111 } // namspace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698