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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); | 50 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); |
51 | 51 |
52 int NextDeviceId(); | 52 int NextDeviceId(); |
53 | 53 |
54 // DeviceEventObserver overrides: | 54 // DeviceEventObserver overrides: |
55 // | 55 // |
56 // Callback for device add (on UI thread). | 56 // Callback for device add (on UI thread). |
57 virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; | 57 virtual void OnDeviceEvent(const DeviceEvent& event) override; |
58 | 58 |
59 // PlatformEventSource: | 59 // PlatformEventSource: |
60 virtual void OnDispatcherListChanged() OVERRIDE; | 60 virtual void OnDispatcherListChanged() override; |
61 | 61 |
62 // Owned per-device event converters (by path). | 62 // Owned per-device event converters (by path). |
63 std::map<base::FilePath, EventConverterEvdev*> converters_; | 63 std::map<base::FilePath, EventConverterEvdev*> converters_; |
64 | 64 |
65 // Used to uniquely identify input devices. | 65 // Used to uniquely identify input devices. |
66 int last_device_id_; | 66 int last_device_id_; |
67 | 67 |
68 // Interface for scanning & monitoring input devices. | 68 // Interface for scanning & monitoring input devices. |
69 DeviceManager* device_manager_; // Not owned. | 69 DeviceManager* device_manager_; // Not owned. |
70 | 70 |
(...skipping 11 matching lines...) Expand all Loading... |
82 | 82 |
83 // Support weak pointers for attach & detach callbacks. | 83 // Support weak pointers for attach & detach callbacks. |
84 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 84 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 86 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace ui | 89 } // namespace ui |
90 | 90 |
91 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 91 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
OLD | NEW |