OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |
| 6 #define UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |
| 7 |
| 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/message_pump_libevent.h" |
| 10 #include "ui/base/ui_export.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 class TouchEventFromEvdevConverter; |
| 15 |
| 16 // Sets up and manages watcher instances for event sources in /dev/input/*. |
| 17 class UI_EXPORT EventFactoryEvdev { |
| 18 public: |
| 19 EventFactoryEvdev(); |
| 20 virtual ~EventFactoryEvdev(); |
| 21 |
| 22 // Opens /dev/input/* event sources as appropriate and set up watchers. |
| 23 void CreateEvdevWatchers(); |
| 24 private: |
| 25 // FileDescriptorWatcher instances for each watched source of events. |
| 26 ScopedVector<TouchEventFromEvdevConverter> evdev_watchers_; |
| 27 ScopedVector<base::MessagePumpLibevent::FileDescriptorWatcher> |
| 28 fd_controllers_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
| 31 }; |
| 32 |
| 33 } // namespace ui |
| 34 |
| 35 #endif // UI_BASE_LINUX_EVENT_FACTORY_EVDEV_H_ |
OLD | NEW |