| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.h" | 5 #include "ui/events/ozone/evdev/touch_event_converter.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/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/message_loop/message_pump_ozone.h" | 20 #include "base/message_loop/message_pump_ozone.h" |
| 21 #include "ui/events/event.h" | 21 #include "ui/events/event.h" |
| 22 #include "ui/events/event_constants.h" | 22 #include "ui/events/event_constants.h" |
| 23 #include "ui/events/ozone/event_factory_ozone.h" |
| 23 #include "ui/gfx/ozone/surface_factory_ozone.h" | 24 #include "ui/gfx/ozone/surface_factory_ozone.h" |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 27 // Number is determined empirically. | 28 // Number is determined empirically. |
| 28 // TODO(rjkroege): Configure this per device. | 29 // TODO(rjkroege): Configure this per device. |
| 29 const float kFingerWidth = 25.f; | 30 const float kFingerWidth = 25.f; |
| 30 | 31 |
| 31 } // namespace | 32 } // namespace |
| 32 | 33 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 default: | 206 default: |
| 206 NOTREACHED() << "invalid code for EV_KEY: " << input.code; | 207 NOTREACHED() << "invalid code for EV_KEY: " << input.code; |
| 207 } | 208 } |
| 208 } else { | 209 } else { |
| 209 NOTREACHED() << "invalid type: " << input.type; | 210 NOTREACHED() << "invalid type: " << input.type; |
| 210 } | 211 } |
| 211 } | 212 } |
| 212 } | 213 } |
| 213 | 214 |
| 214 } // namespace ui | 215 } // namespace ui |
| OLD | NEW |