Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc

Issue 864253002: Dump property values for the touch log source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix %lu -> %zu Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h ('k') | ui/ozone/public/input_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698