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