OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_EVENTS_OZONE_EVDEV_KEY_EVENT_CONVERTER_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_KEY_EVENT_CONVERTER_EVDEV_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "base/message_loop/message_pump_libevent.h" |
| 10 #include "ui/events/event.h" |
| 11 #include "ui/events/ozone/evdev/event_converter_evdev.h" |
| 12 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" |
| 13 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
| 14 #include "ui/events/ozone/evdev/keyboard_evdev.h" |
| 15 |
| 16 struct input_event; |
| 17 |
| 18 namespace ui { |
| 19 |
| 20 class EVENTS_OZONE_EVDEV_EXPORT KeyEventConverterEvdev |
| 21 : public EventConverterEvdev { |
| 22 public: |
| 23 KeyEventConverterEvdev(int fd, |
| 24 base::FilePath path, |
| 25 int id, |
| 26 KeyboardEvdev* keyboard); |
| 27 virtual ~KeyEventConverterEvdev(); |
| 28 |
| 29 // EventConverterEvdev: |
| 30 virtual void OnFileCanReadWithoutBlocking(int fd) override; |
| 31 |
| 32 void ProcessEvents(const struct input_event* inputs, int count); |
| 33 |
| 34 private: |
| 35 // Controller for watching the input fd. |
| 36 base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
| 37 |
| 38 // Shared keyboard state. |
| 39 KeyboardEvdev* keyboard_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(KeyEventConverterEvdev); |
| 42 }; |
| 43 |
| 44 } // namspace ui |
| 45 |
| 46 #endif // UI_EVENTS_OZONE_EVDEV_KEY_EVENT_CONVERTER_EVDEV_H_ |
| 47 |
OLD | NEW |