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> |
(...skipping 29 matching lines...) Expand all Loading... |
40 int bezel_top; | 40 int bezel_top; |
41 int bezel_bottom; | 41 int bezel_bottom; |
42 }; | 42 }; |
43 | 43 |
44 void GetTouchCalibration(TouchCalibration* cal) { | 44 void GetTouchCalibration(TouchCalibration* cal) { |
45 std::vector<std::string> parts; | 45 std::vector<std::string> parts; |
46 if (Tokenize(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 46 if (Tokenize(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
47 switches::kTouchCalibration), | 47 switches::kTouchCalibration), |
48 ",", &parts) >= 4) { | 48 ",", &parts) >= 4) { |
49 if (!base::StringToInt(parts[0], &cal->bezel_left)) | 49 if (!base::StringToInt(parts[0], &cal->bezel_left)) |
50 DLOG(ERROR) << "Incorrect left border calibration value passed."; | 50 LOG(ERROR) << "Incorrect left border calibration value passed."; |
51 if (!base::StringToInt(parts[1], &cal->bezel_right)) | 51 if (!base::StringToInt(parts[1], &cal->bezel_right)) |
52 DLOG(ERROR) << "Incorrect right border calibration value passed."; | 52 LOG(ERROR) << "Incorrect right border calibration value passed."; |
53 if (!base::StringToInt(parts[2], &cal->bezel_top)) | 53 if (!base::StringToInt(parts[2], &cal->bezel_top)) |
54 DLOG(ERROR) << "Incorrect top border calibration value passed."; | 54 LOG(ERROR) << "Incorrect top border calibration value passed."; |
55 if (!base::StringToInt(parts[3], &cal->bezel_bottom)) | 55 if (!base::StringToInt(parts[3], &cal->bezel_bottom)) |
56 DLOG(ERROR) << "Incorrect bottom border calibration value passed."; | 56 LOG(ERROR) << "Incorrect bottom border calibration value passed."; |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 namespace ui { | 62 namespace ui { |
63 | 63 |
64 TouchEventConverterEvdev::TouchEventConverterEvdev( | 64 TouchEventConverterEvdev::TouchEventConverterEvdev( |
65 int fd, | 65 int fd, |
66 base::FilePath path, | 66 base::FilePath path, |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 if (event_type != ET_UNKNOWN) | 304 if (event_type != ET_UNKNOWN) |
305 ReportEvent(*event, event_type, delta); | 305 ReportEvent(*event, event_type, delta); |
306 | 306 |
307 event->was_touching = event->touching; | 307 event->was_touching = event->touching; |
308 event->altered = false; | 308 event->altered = false; |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 } // namespace ui | 312 } // namespace ui |
OLD | NEW |