Chromium Code Reviews| Index: ui/events/ozone/evdev/event_factory.h |
| diff --git a/ui/events/ozone/evdev/event_factory.h b/ui/events/ozone/evdev/event_factory.h |
| index a0fbbe46b176d44a8e236573a4dd9710c5e0a6cb..210a2746f313b43ceaf0ab1386b4b2ede0cf4dc2 100644 |
| --- a/ui/events/ozone/evdev/event_factory.h |
| +++ b/ui/events/ozone/evdev/event_factory.h |
| @@ -7,6 +7,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/files/file_path.h" |
| +#include "base/message_loop/message_pump_libevent.h" |
| #include "ui/events/events_export.h" |
| #include "ui/events/ozone/evdev/event_converter.h" |
| #include "ui/events/ozone/evdev/event_modifiers.h" |
| @@ -18,6 +19,10 @@ |
| namespace ui { |
| +#if defined(USE_UDEV) |
| +class UdevWatcher; |
| +#endif |
| + |
| // Ozone events implementation for the Linux input subsystem ("evdev"). |
| class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone { |
| public: |
| @@ -30,12 +35,18 @@ class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone { |
| // Open device at path & starting processing events. |
| void AttachInputDevice(const base::FilePath& file_path); |
| + // Close device at path. |
| + void DetachInputDevice(const base::FilePath& file_path); |
| + |
| // Scan & open devices in /dev/input (without udev). |
| void StartProcessingEventsManual(); |
| #if defined(USE_UDEV) |
| // Scan & open devices using udev. |
| void StartProcessingEventsUdev(); |
| + |
| + // Set up device monitor for hotplug. |
| + bool StartMonitoringDevicesUdev(); |
| #endif |
| // Owned per-device event converters (by path). |
| @@ -44,6 +55,12 @@ class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone { |
| #if defined(USE_UDEV) |
| // Udev daemon connection. |
| scoped_udev udev_; |
| + |
| + // Udev device change monitor. |
| + scoped_udev_monitor udev_monitor_; |
| + |
| + // Watcher for uevent netlink socket. |
| + scoped_ptr<UdevWatcher> watcher_; |
|
sadrul
2014/01/30 22:10:36
Can there a be single scoped_ptr<UdevController> t
rjkroege
2014/01/30 22:18:09
+1
spang
2014/01/31 17:33:00
Done.
|
| #endif |
| EventModifiersEvdev modifiers_; |