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