OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Dispatch event via PlatformEventSource. | 78 // Dispatch event via PlatformEventSource. |
79 void DispatchUiEventTask(scoped_ptr<Event> event); | 79 void DispatchUiEventTask(scoped_ptr<Event> event); |
80 | 80 |
81 // Open device at path & starting processing events (on UI thread). | 81 // Open device at path & starting processing events (on UI thread). |
82 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); | 82 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); |
83 | 83 |
84 // Close device at path (on UI thread). | 84 // Close device at path (on UI thread). |
85 void DetachInputDevice(const base::FilePath& file_path); | 85 void DetachInputDevice(const base::FilePath& file_path); |
86 | 86 |
87 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); | 87 // Update observers on device changes. |
| 88 void NotifyDeviceChange(const EventConverterEvdev& converter); |
| 89 void NotifyKeyboardsUpdated(); |
| 90 void NotifyTouchscreensUpdated(); |
88 | 91 |
89 int NextDeviceId(); | 92 int NextDeviceId(); |
90 | 93 |
91 // Owned per-device event converters (by path). | 94 // Owned per-device event converters (by path). |
92 std::map<base::FilePath, EventConverterEvdev*> converters_; | 95 std::map<base::FilePath, EventConverterEvdev*> converters_; |
93 | 96 |
94 // Used to uniquely identify input devices. | 97 // Used to uniquely identify input devices. |
95 int last_device_id_; | 98 int last_device_id_; |
96 | 99 |
97 // Interface for scanning & monitoring input devices. | 100 // Interface for scanning & monitoring input devices. |
(...skipping 27 matching lines...) Expand all Loading... |
125 | 128 |
126 // Support weak pointers for attach & detach callbacks. | 129 // Support weak pointers for attach & detach callbacks. |
127 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 130 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
128 | 131 |
129 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 132 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
130 }; | 133 }; |
131 | 134 |
132 } // namespace ui | 135 } // namespace ui |
133 | 136 |
134 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 137 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
OLD | NEW |