OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/tablet_event_converter_evdev.h" | 5 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <linux/input.h> | 8 #include <linux/input.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 const EventDeviceInfo& info, | 38 const EventDeviceInfo& info, |
39 DeviceEventDispatcherEvdev* dispatcher) | 39 DeviceEventDispatcherEvdev* dispatcher) |
40 : EventConverterEvdev(fd.get(), | 40 : EventConverterEvdev(fd.get(), |
41 path, | 41 path, |
42 id, | 42 id, |
43 info.device_type(), | 43 info.device_type(), |
44 info.name(), | 44 info.name(), |
45 info.vendor_id(), | 45 info.vendor_id(), |
46 info.product_id()), | 46 info.product_id()), |
47 input_device_fd_(std::move(fd)), | 47 input_device_fd_(std::move(fd)), |
| 48 controller_(FROM_HERE), |
48 cursor_(cursor), | 49 cursor_(cursor), |
49 dispatcher_(dispatcher) { | 50 dispatcher_(dispatcher) { |
50 x_abs_min_ = info.GetAbsMinimum(ABS_X); | 51 x_abs_min_ = info.GetAbsMinimum(ABS_X); |
51 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; | 52 x_abs_range_ = info.GetAbsMaximum(ABS_X) - x_abs_min_ + 1; |
52 y_abs_min_ = info.GetAbsMinimum(ABS_Y); | 53 y_abs_min_ = info.GetAbsMinimum(ABS_Y); |
53 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; | 54 y_abs_range_ = info.GetAbsMaximum(ABS_Y) - y_abs_min_ + 1; |
54 tilt_x_min_ = info.GetAbsMinimum(ABS_TILT_X); | 55 tilt_x_min_ = info.GetAbsMinimum(ABS_TILT_X); |
55 tilt_y_min_ = info.GetAbsMinimum(ABS_TILT_Y); | 56 tilt_y_min_ = info.GetAbsMinimum(ABS_TILT_Y); |
56 tilt_x_range_ = info.GetAbsMaximum(ABS_TILT_X) - tilt_x_min_ + 1; | 57 tilt_x_range_ = info.GetAbsMaximum(ABS_TILT_X) - tilt_x_min_ + 1; |
57 tilt_y_range_ = info.GetAbsMaximum(ABS_TILT_Y) - tilt_y_min_ + 1; | 58 tilt_y_range_ = info.GetAbsMaximum(ABS_TILT_Y) - tilt_y_min_ + 1; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 input_device_.id, EF_NONE, cursor_->GetLocation(), | 213 input_device_.id, EF_NONE, cursor_->GetLocation(), |
213 PointerDetails(GetToolType(stylus_), | 214 PointerDetails(GetToolType(stylus_), |
214 /* radius_x */ 0.0f, /* radius_y */ 0.0f, pressure_, | 215 /* radius_x */ 0.0f, /* radius_y */ 0.0f, pressure_, |
215 tilt_x_, tilt_y_), | 216 tilt_x_, tilt_y_), |
216 TimeTicksFromInputEvent(input))); | 217 TimeTicksFromInputEvent(input))); |
217 | 218 |
218 abs_value_dirty_ = false; | 219 abs_value_dirty_ = false; |
219 } | 220 } |
220 | 221 |
221 } // namespace ui | 222 } // namespace ui |
OLD | NEW |