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_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ |
7 | 7 |
8 #include <gestures/gestures.h> | 8 #include <gestures/gestures.h> |
9 #include <libevdev/libevdev.h> | 9 #include <libevdev/libevdev.h> |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 private: | 106 private: |
107 friend class GesturesPropFunctionsWrapper; | 107 friend class GesturesPropFunctionsWrapper; |
108 | 108 |
109 // Mapping table from a device id to its device pointer. | 109 // Mapping table from a device id to its device pointer. |
110 typedef std::map<DeviceId, DevicePtr> DeviceMap; | 110 typedef std::map<DeviceId, DevicePtr> DeviceMap; |
111 | 111 |
112 // Mapping table from a device id to its property data. | 112 // Mapping table from a device id to its property data. |
113 // GestureDevicePropertyData contains both properties in use and default | 113 // GestureDevicePropertyData contains both properties in use and default |
114 // properties whose values will be applied upon the device attachment. | 114 // properties whose values will be applied upon the device attachment. |
115 typedef base::ScopedPtrHashMap<DeviceId, internal::GestureDevicePropertyData> | 115 typedef base::ScopedPtrHashMap< |
116 ScopedDeviceDataMap; | 116 DeviceId, |
| 117 scoped_ptr<internal::GestureDevicePropertyData>> ScopedDeviceDataMap; |
117 | 118 |
118 // Register a device. Setup data-structures and the device's default | 119 // Register a device. Setup data-structures and the device's default |
119 // properties. | 120 // properties. |
120 void RegisterDevice(const DeviceId id, const DevicePtr device); | 121 void RegisterDevice(const DeviceId id, const DevicePtr device); |
121 | 122 |
122 // Unregister a device. Remove all of its properties being tracked. | 123 // Unregister a device. Remove all of its properties being tracked. |
123 void UnregisterDevice(const DeviceId id); | 124 void UnregisterDevice(const DeviceId id); |
124 | 125 |
125 // Called by functions in GesturesPropFunctionsWrapper to manipulate | 126 // Called by functions in GesturesPropFunctionsWrapper to manipulate |
126 // properties. Note these functions do not new/delete the GesturesProp | 127 // properties. Note these functions do not new/delete the GesturesProp |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // Handler function pointers and the data to be passed to them when the | 332 // Handler function pointers and the data to be passed to them when the |
332 // property is accessed. | 333 // property is accessed. |
333 GesturesPropGetHandler get_; | 334 GesturesPropGetHandler get_; |
334 GesturesPropSetHandler set_; | 335 GesturesPropSetHandler set_; |
335 void* handler_data_; | 336 void* handler_data_; |
336 | 337 |
337 DISALLOW_COPY_AND_ASSIGN(GesturesProp); | 338 DISALLOW_COPY_AND_ASSIGN(GesturesProp); |
338 }; | 339 }; |
339 | 340 |
340 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ | 341 #endif // UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_PROPERTY_PROVIDER_H_ |
OLD | NEW |