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 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ |
7 | 7 |
8 #include <libevdev/libevdev.h> | 8 #include <libevdev/libevdev.h> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Notifier for event. This is called with the updated event state. | 32 // Notifier for event. This is called with the updated event state. |
33 virtual void OnLibEvdevCrosEvent(Evdev* evdev, | 33 virtual void OnLibEvdevCrosEvent(Evdev* evdev, |
34 EventStateRec* state, | 34 EventStateRec* state, |
35 const timeval& time) = 0; | 35 const timeval& time) = 0; |
36 }; | 36 }; |
37 | 37 |
38 EventReaderLibevdevCros(int fd, | 38 EventReaderLibevdevCros(int fd, |
39 const base::FilePath& path, | 39 const base::FilePath& path, |
40 int id, | 40 int id, |
| 41 InputDeviceType type, |
41 scoped_ptr<Delegate> delegate); | 42 scoped_ptr<Delegate> delegate); |
42 ~EventReaderLibevdevCros(); | 43 ~EventReaderLibevdevCros(); |
43 | 44 |
44 // EventConverterEvdev: | 45 // EventConverterEvdev: |
45 void OnFileCanReadWithoutBlocking(int fd) override; | 46 void OnFileCanReadWithoutBlocking(int fd) override; |
46 | 47 |
47 private: | 48 private: |
48 static void OnSynReport(void* data, | 49 static void OnSynReport(void* data, |
49 EventStateRec* evstate, | 50 EventStateRec* evstate, |
50 struct timeval* tv); | 51 struct timeval* tv); |
(...skipping 10 matching lines...) Expand all Loading... |
61 | 62 |
62 // Delegate for event processing. | 63 // Delegate for event processing. |
63 scoped_ptr<Delegate> delegate_; | 64 scoped_ptr<Delegate> delegate_; |
64 | 65 |
65 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros); | 66 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros); |
66 }; | 67 }; |
67 | 68 |
68 } // namspace ui | 69 } // namspace ui |
69 | 70 |
70 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ | 71 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ |
OLD | NEW |