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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 scoped_ptr<EventConverterEvdev> converter); | 45 scoped_ptr<EventConverterEvdev> converter); |
46 | 46 |
47 // Close device at path (on UI thread). | 47 // Close device at path (on UI thread). |
48 void DetachInputDevice(const base::FilePath& file_path); | 48 void DetachInputDevice(const base::FilePath& file_path); |
49 | 49 |
50 // DeviceEventObserver overrides: | 50 // DeviceEventObserver overrides: |
51 // | 51 // |
52 // Callback for device add (on UI thread). | 52 // Callback for device add (on UI thread). |
53 virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; | 53 virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; |
54 | 54 |
| 55 // PlatformEventSource: |
| 56 virtual void OnDispatcherListChanged() OVERRIDE; |
| 57 |
55 // Owned per-device event converters (by path). | 58 // Owned per-device event converters (by path). |
56 std::map<base::FilePath, EventConverterEvdev*> converters_; | 59 std::map<base::FilePath, EventConverterEvdev*> converters_; |
57 | 60 |
58 // Interface for scanning & monitoring input devices. | 61 // Interface for scanning & monitoring input devices. |
59 DeviceManager* device_manager_; // Not owned. | 62 DeviceManager* device_manager_; // Not owned. |
60 | 63 |
61 // True if this was registered with |device_manager_|. This is needed since | 64 // True if this was registered with |device_manager_|. This is needed since |
62 // StartProcessingEvents() is called multiple times (when a | 65 // StartProcessingEvents() is called multiple times (when a |
63 // WindowTreeHostOzone is created) but we shouldn't register this multiple | 66 // WindowTreeHostOzone is created) but we shouldn't register this multiple |
64 // times. | 67 // times. |
(...skipping 15 matching lines...) Expand all Loading... |
80 | 83 |
81 // Support weak pointers for attach & detach callbacks. | 84 // Support weak pointers for attach & detach callbacks. |
82 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 85 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
83 | 86 |
84 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 87 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
85 }; | 88 }; |
86 | 89 |
87 } // namespace ui | 90 } // namespace ui |
88 | 91 |
89 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 92 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
OLD | NEW |