| 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 24 matching lines...) Expand all Loading... |
| 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 scoped_ptr<Delegate> delegate); | 41 scoped_ptr<Delegate> delegate); |
| 42 ~EventReaderLibevdevCros(); | 42 ~EventReaderLibevdevCros(); |
| 43 | 43 |
| 44 // EventConverterEvdev: | 44 // EventConverterEvdev: |
| 45 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; | 45 virtual void OnFileCanReadWithoutBlocking(int fd) override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 static void OnSynReport(void* data, | 48 static void OnSynReport(void* data, |
| 49 EventStateRec* evstate, | 49 EventStateRec* evstate, |
| 50 struct timeval* tv); | 50 struct timeval* tv); |
| 51 static void OnLogMessage(void*, int level, const char*, ...); | 51 static void OnLogMessage(void*, int level, const char*, ...); |
| 52 | 52 |
| 53 // Libevdev state. | 53 // Libevdev state. |
| 54 Evdev evdev_; | 54 Evdev evdev_; |
| 55 | 55 |
| 56 // Event state. | 56 // Event state. |
| 57 EventStateRec evstate_; | 57 EventStateRec evstate_; |
| 58 | 58 |
| 59 // Path to input device. | 59 // Path to input device. |
| 60 base::FilePath path_; | 60 base::FilePath path_; |
| 61 | 61 |
| 62 // Delegate for event processing. | 62 // Delegate for event processing. |
| 63 scoped_ptr<Delegate> delegate_; | 63 scoped_ptr<Delegate> delegate_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros); | 65 DISALLOW_COPY_AND_ASSIGN(EventReaderLibevdevCros); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namspace ui | 68 } // namspace ui |
| 69 | 69 |
| 70 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ | 70 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_EVENT_READER_LIBEVDEV_CROS_H_ |
| OLD | NEW |