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

Unified Diff: device/hid/hid_service_win.cc

Issue 256673002: HID: Support top-level collection usages in device info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « device/hid/hid_service_mac.cc ('k') | device/hid/hid_usage_and_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_service_win.cc
diff --git a/device/hid/hid_service_win.cc b/device/hid/hid_service_win.cc
index 0746bf318d0211b1ea4232323de12c3774e92368..dade5d2e51fe3d5b5775051e431c31fdb55cbc99 100644
--- a/device/hid/hid_service_win.cc
+++ b/device/hid/hid_service_win.cc
@@ -175,11 +175,12 @@ void HidServiceWin::PlatformAddDevice(const std::string& device_path) {
preparsed_data) {
HIDP_CAPS capabilities;
if (HidP_GetCaps(preparsed_data, &capabilities) == HIDP_STATUS_SUCCESS) {
- device_info.usage = capabilities.Usage;
- device_info.usage_page = capabilities.UsagePage;
device_info.input_report_size = capabilities.InputReportByteLength;
device_info.output_report_size = capabilities.OutputReportByteLength;
device_info.feature_report_size = capabilities.FeatureReportByteLength;
+ device_info.usages.push_back(HidUsageAndPage(
+ capabilities.Usage,
+ static_cast<HidUsageAndPage::Page>(capabilities.UsagePage)));
}
// Detect if the device supports report ids.
if (capabilities.NumberInputValueCaps > 0) {
« no previous file with comments | « device/hid/hid_service_mac.cc ('k') | device/hid/hid_usage_and_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698