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

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

Issue 1294523004: ozone: Handle pressure and tilt for stylus devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-pe-details
Patch Set: Address spang@ feedback Created 5 years, 4 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 bool suppress_auto_repeat, 12 bool suppress_auto_repeat,
13 base::TimeDelta timestamp) 13 base::TimeDelta timestamp)
14 : device_id(device_id), 14 : device_id(device_id),
15 code(code), 15 code(code),
16 down(down), 16 down(down),
17 suppress_auto_repeat(suppress_auto_repeat), 17 suppress_auto_repeat(suppress_auto_repeat),
18 timestamp(timestamp) { 18 timestamp(timestamp) {
19 } 19 }
20 20
21 KeyEventParams::KeyEventParams(const KeyEventParams& other) = default; 21 KeyEventParams::KeyEventParams(const KeyEventParams& other) = default;
22 22
23 KeyEventParams::~KeyEventParams() { 23 KeyEventParams::~KeyEventParams() {
24 } 24 }
25 25
26 MouseMoveEventParams::MouseMoveEventParams(int device_id, 26 MouseMoveEventParams::MouseMoveEventParams(int device_id,
27 const gfx::PointF& location, 27 const gfx::PointF& location,
28 EventPointerType pointer_type,
29 float force,
30 float tilt_x,
31 float tilt_y,
28 base::TimeDelta timestamp) 32 base::TimeDelta timestamp)
29 : device_id(device_id), location(location), timestamp(timestamp) { 33 : device_id(device_id),
30 } 34 location(location),
35 pointer_type(pointer_type),
36 force(force),
37 tilt_x(tilt_x),
38 tilt_y(tilt_y),
39 timestamp(timestamp) {}
31 40
32 MouseMoveEventParams::MouseMoveEventParams(const MouseMoveEventParams& other) = 41 MouseMoveEventParams::MouseMoveEventParams(const MouseMoveEventParams& other) =
33 default; 42 default;
34 43
35 MouseMoveEventParams::~MouseMoveEventParams() { 44 MouseMoveEventParams::~MouseMoveEventParams() {
36 } 45 }
37 46
38 MouseButtonEventParams::MouseButtonEventParams(int device_id, 47 MouseButtonEventParams::MouseButtonEventParams(int device_id,
39 const gfx::PointF& location, 48 const gfx::PointF& location,
40 unsigned int button, 49 unsigned int button,
41 bool down, 50 bool down,
42 bool allow_remap, 51 bool allow_remap,
52 EventPointerType pointer_type,
53 float force,
54 float tilt_x,
55 float tilt_y,
43 base::TimeDelta timestamp) 56 base::TimeDelta timestamp)
44 : device_id(device_id), 57 : device_id(device_id),
45 location(location), 58 location(location),
46 button(button), 59 button(button),
47 down(down), 60 down(down),
48 allow_remap(allow_remap), 61 allow_remap(allow_remap),
49 timestamp(timestamp) { 62 pointer_type(pointer_type),
50 } 63 force(force),
64 tilt_x(tilt_x),
65 tilt_y(tilt_y),
66 timestamp(timestamp) {}
51 67
52 MouseButtonEventParams::MouseButtonEventParams( 68 MouseButtonEventParams::MouseButtonEventParams(
53 const MouseButtonEventParams& other) = default; 69 const MouseButtonEventParams& other) = default;
54 70
55 MouseButtonEventParams::~MouseButtonEventParams() { 71 MouseButtonEventParams::~MouseButtonEventParams() {
56 } 72 }
57 73
58 MouseWheelEventParams::MouseWheelEventParams(int device_id, 74 MouseWheelEventParams::MouseWheelEventParams(int device_id,
59 const gfx::PointF& location, 75 const gfx::PointF& location,
60 const gfx::Vector2d& delta, 76 const gfx::Vector2d& delta,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 pressure(pressure), 123 pressure(pressure),
108 timestamp(timestamp) { 124 timestamp(timestamp) {
109 } 125 }
110 126
111 TouchEventParams::TouchEventParams(const TouchEventParams& other) = default; 127 TouchEventParams::TouchEventParams(const TouchEventParams& other) = default;
112 128
113 TouchEventParams::~TouchEventParams() { 129 TouchEventParams::~TouchEventParams() {
114 } 130 }
115 131
116 } // namspace ui 132 } // namspace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698