Index: ui/base/linux/event_factory_evdev.h |
diff --git a/ui/base/linux/event_factory_evdev.h b/ui/base/linux/event_factory_evdev.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a152dbe82c48acdd19aedb65c727131b7fffcce9 |
--- /dev/null |
+++ b/ui/base/linux/event_factory_evdev.h |
@@ -0,0 +1,35 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |
+#define UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |
+ |
+#include "base/memory/scoped_vector.h" |
+#include "base/message_pump_libevent.h" |
+#include "ui/base/ui_export.h" |
+ |
+namespace ui { |
+ |
+class TouchEventFromEvdevConverter; |
+ |
+// Sets up and manages watcher instances for event sources in /dev/input/*. |
+class UI_EXPORT EventFactoryEvdev { |
+ public: |
+ EventFactoryEvdev(); |
+ virtual ~EventFactoryEvdev(); |
+ |
+ // Opens /dev/input/* event sources as appropriate and set up watchers. |
+ void CreateEvdevWatchers(); |
+ private: |
+ // FileDescriptorWatcher instances for each watched source of events. |
+ ScopedVector<TouchEventFromEvdevConverter> evdev_watchers_; |
+ ScopedVector<base::MessagePumpLibevent::FileDescriptorWatcher> |
+ fd_controllers_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |