Index: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc |
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc |
index 76100b6124e99ca18761b9181ec1d190168c5463..766ffb25ea019179d493f621b96461821ad7d16c 100644 |
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc |
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc |
@@ -877,6 +877,30 @@ GesturesProp* GesturePropertyProvider::GetProperty(const DeviceId device_id, |
return FindProperty(device_id, name); |
} |
+std::vector<std::string> GesturePropertyProvider::GetPropertyNamesById( |
+ const DeviceId device_id) { |
+ internal::GestureDevicePropertyData* device_data = |
+ device_data_map_.get(device_id); |
+ if (!device_data) |
+ return std::vector<std::string>(); |
+ |
+ // Dump all property names of the device. |
+ std::vector<std::string> names; |
+ for (internal::ScopedPropertiesMap::const_iterator it = |
+ device_data->properties.begin(); |
+ it != device_data->properties.end(); ++it) |
+ names.push_back(it->first); |
+ return names; |
+} |
+ |
+std::string GesturePropertyProvider::GetDeviceNameById( |
+ const DeviceId device_id) { |
+ DeviceMap::const_iterator it = device_map_.find(device_id); |
+ if (it == device_map_.end()) |
+ return std::string(); |
+ return std::string(it->second->info.name); |
+} |
+ |
void GesturePropertyProvider::RegisterDevice(const DeviceId id, |
const DevicePtr device) { |
DeviceMap::const_iterator it = device_map_.find(id); |