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/touch_event_converter_evdev.h" | 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/input.h> | 9 #include <linux/input.h> |
10 #include <poll.h> | 10 #include <poll.h> |
11 #include <stdio.h> | 11 #include <stdio.h> |
12 #include <unistd.h> | 12 #include <unistd.h> |
13 | 13 |
14 #include <cmath> | 14 #include <cmath> |
15 #include <limits> | 15 #include <limits> |
16 | 16 |
17 #include "base/bind.h" | 17 #include "base/bind.h" |
18 #include "base/callback.h" | 18 #include "base/callback.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/memory/scoped_vector.h" | |
22 #include "base/message_loop/message_loop.h" | 21 #include "base/message_loop/message_loop.h" |
23 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
24 #include "base/strings/string_split.h" | 23 #include "base/strings/string_split.h" |
25 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
26 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
27 #include "base/trace_event/trace_event.h" | 26 #include "base/trace_event/trace_event.h" |
28 #include "ui/events/devices/device_data_manager.h" | 27 #include "ui/events/devices/device_data_manager.h" |
29 #include "ui/events/devices/device_util_linux.h" | 28 #include "ui/events/devices/device_util_linux.h" |
30 #include "ui/events/event.h" | 29 #include "ui/events/event.h" |
31 #include "ui/events/event_constants.h" | 30 #include "ui/events/event_constants.h" |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 if (pressure_max_ - pressure_min_) | 447 if (pressure_max_ - pressure_min_) |
449 pressure /= pressure_max_ - pressure_min_; | 448 pressure /= pressure_max_ - pressure_min_; |
450 return pressure; | 449 return pressure; |
451 } | 450 } |
452 | 451 |
453 int TouchEventConverterEvdev::NextTrackingId() { | 452 int TouchEventConverterEvdev::NextTrackingId() { |
454 return next_tracking_id_++ & kMaxTrackingId; | 453 return next_tracking_id_++ & kMaxTrackingId; |
455 } | 454 } |
456 | 455 |
457 } // namespace ui | 456 } // namespace ui |
OLD | NEW |