The WebHID API enables web applications to request access to HID devices, send and receive HID reports, and retrieve information about the report descriptor. PRD: go/webhidprd Explainer: https://github.com/nondebug/webhid/blob/master/EXPLAINER.md Chrome feature status: https://www.chromestatus.com/feature/5172464636133376
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8e946f8a6f55e934e3c81ecce43620a63faa8acd commit 8e946f8a6f55e934e3c81ecce43620a63faa8acd Author: Matt Reynolds <mattreynolds@google.com> Date: Mon Nov 05 18:56:10 2018 Add self as owner of chrome.hid and //services/device BUG=890096 Change-Id: I08bc0e42416e0dfd7e1c9409746f058b9dc1e767 Reviewed-on: https://chromium-review.googlesource.com/c/1318080 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#605400} [modify] https://crrev.com/8e946f8a6f55e934e3c81ecce43620a63faa8acd/extensions/browser/api/hid/OWNERS [modify] https://crrev.com/8e946f8a6f55e934e3c81ecce43620a63faa8acd/services/device/OWNERS
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/05ac99d21920fec606ac1e360a2534921938cc85 commit 05ac99d21920fec606ac1e360a2534921938cc85 Author: Matt Reynolds <mattreynolds@google.com> Date: Mon Nov 05 19:44:05 2018 Add device descriptor tests for popular HID gamepads HidReportDescriptor tests for four console gamepads: * Dualshock 3 connected over USB * Dualshock 4 connected over USB * Xbox Wireless Controller connected over Bluetooth * Nintendo Switch Pro connected over USB BUG=890096 Change-Id: I47629f69eb0257f9c985e5e438f979b5b0497f7f Reviewed-on: https://chromium-review.googlesource.com/c/1258502 Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Reviewed-by: Ovidio Henriquez <odejesush@chromium.org> Cr-Commit-Position: refs/heads/master@{#605418} [modify] https://crrev.com/05ac99d21920fec606ac1e360a2534921938cc85/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/05ac99d21920fec606ac1e360a2534921938cc85/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/05ac99d21920fec606ac1e360a2534921938cc85/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6a235ad71f5f34c4b43a5c6be4a78c96cb748921 commit 6a235ad71f5f34c4b43a5c6be4a78c96cb748921 Author: Matt Reynolds <mattreynolds@google.com> Date: Tue Jan 29 00:49:03 2019 Parse HID report descriptor for report info The previous HID report descriptor parser was designed to only extract the maximum size of each type of report and did not preserve information about the individual fields within a report. This CL adds a new parser that builds a hierarchical representation of the reports supported by the HID device. BUG=890096 Change-Id: I4ac3bf883a843bec00576bfad78958d42f53abc7 Reviewed-on: https://chromium-review.googlesource.com/c/1257897 Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> Cr-Commit-Position: refs/heads/master@{#626816} [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/BUILD.gn [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/fake_input_service_linux.h [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_collection.cc [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_collection.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_device_filter.h [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_item_state_table.cc [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_item_state_table.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_descriptor.cc [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_descriptor.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_descriptor_item.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_item.cc [add] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_report_item.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/cpp/hid/hid_usage_and_page.h [modify] https://crrev.com/6a235ad71f5f34c4b43a5c6be4a78c96cb748921/services/device/public/mojom/hid.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1d9445f61a31097fdd698fdc0b3032dbf7f1580a commit 1d9445f61a31097fdd698fdc0b3032dbf7f1580a Author: Findit <findit-for-me@appspot.gserviceaccount.com> Date: Tue Jan 29 03:32:17 2019 Revert "Parse HID report descriptor for report info" This reverts commit 6a235ad71f5f34c4b43a5c6be4a78c96cb748921. Reason for revert: Findit (https://goo.gl/kROfz5) identified CL at revision 626816 as the culprit for flakes in the build cycles as shown on: https://findit-for-me.appspot.com/waterfall/flake/flake-culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vNmEyMzVhZDcxZjVmMzRjNGI0M2E1YzZiZTRhNzhjOTZjYjc0ODkyMQw Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Linux%20Tests%20%28dbg%29%281%29%2832%29/56035 Sample Failed Step: services_unittests Sample Flaky Test: HidReportDescriptorTest.ValidateDetails_BelkinNostromoMouseAndExtra Original change's description: > Parse HID report descriptor for report info > > The previous HID report descriptor parser was designed to only > extract the maximum size of each type of report and did not preserve > information about the individual fields within a report. This CL > adds a new parser that builds a hierarchical representation of the > reports supported by the HID device. > > BUG=890096 > > Change-Id: I4ac3bf883a843bec00576bfad78958d42f53abc7 > Reviewed-on: https://chromium-review.googlesource.com/c/1257897 > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> > Cr-Commit-Position: refs/heads/master@{#626816} No-Presubmit: true No-Tree-Checks: true No-Try: true BUG=890096 Change-Id: I20e9ea374b71a25c2dfd6ff9535cc936ce1c4d31 Reviewed-on: https://chromium-review.googlesource.com/c/1441952 Cr-Commit-Position: refs/heads/master@{#626875} [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/BUILD.gn [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/fake_input_service_linux.h [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_collection.cc [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_collection.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_device_filter.h [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_item_state_table.cc [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_item_state_table.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_report_descriptor.cc [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_report_descriptor.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_report_descriptor_item.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_report_item.cc [delete] https://crrev.com/7a166c3135e266ae0bb978465cbcc51f72fe142e/services/device/public/cpp/hid/hid_report_item.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/cpp/hid/hid_usage_and_page.h [modify] https://crrev.com/1d9445f61a31097fdd698fdc0b3032dbf7f1580a/services/device/public/mojom/hid.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf7db8be74e4111428f6429e5338ecff362558a7 commit bf7db8be74e4111428f6429e5338ecff362558a7 Author: Matt Reynolds <mattreynolds@google.com> Date: Wed Jan 30 20:22:08 2019 Reland "Parse HID report descriptor for report info" This is a reland of 6a235ad71f5f34c4b43a5c6be4a78c96cb748921 Original change's description: > Parse HID report descriptor for report info > > The previous HID report descriptor parser was designed to only > extract the maximum size of each type of report and did not preserve > information about the individual fields within a report. This CL > adds a new parser that builds a hierarchical representation of the > reports supported by the HID device. > > BUG=890096 > > Change-Id: I4ac3bf883a843bec00576bfad78958d42f53abc7 > Reviewed-on: https://chromium-review.googlesource.com/c/1257897 > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> > Cr-Commit-Position: refs/heads/master@{#626816} BUG=890096 Change-Id: I103b48b1c04650c1c33452bd7bc6110f39d6b732 Reviewed-on: https://chromium-review.googlesource.com/c/1443499 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#627570} [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/BUILD.gn [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/fake_input_service_linux.h [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_collection.cc [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_collection.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_device_filter.h [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_item_state_table.cc [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_item_state_table.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_descriptor.cc [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_descriptor.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_descriptor_item.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_item.cc [add] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_report_item.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/cpp/hid/hid_usage_and_page.h [modify] https://crrev.com/bf7db8be74e4111428f6429e5338ecff362558a7/services/device/public/mojom/hid.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/baa99e304404c00d2da2f48153a1afba5d2c91c2 commit baa99e304404c00d2da2f48153a1afba5d2c91c2 Author: Joshua Pawlicki <waffles@chromium.org> Date: Wed Jan 30 22:57:34 2019 Revert "Reland "Parse HID report descriptor for report info"" This reverts commit bf7db8be74e4111428f6429e5338ecff362558a7. Reason for revert: crbug.com/927104 Original change's description: > Reland "Parse HID report descriptor for report info" > > This is a reland of 6a235ad71f5f34c4b43a5c6be4a78c96cb748921 > > Original change's description: > > Parse HID report descriptor for report info > > > > The previous HID report descriptor parser was designed to only > > extract the maximum size of each type of report and did not preserve > > information about the individual fields within a report. This CL > > adds a new parser that builds a hierarchical representation of the > > reports supported by the HID device. > > > > BUG=890096 > > > > Change-Id: I4ac3bf883a843bec00576bfad78958d42f53abc7 > > Reviewed-on: https://chromium-review.googlesource.com/c/1257897 > > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> > > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > > Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#626816} > > BUG=890096 > > Change-Id: I103b48b1c04650c1c33452bd7bc6110f39d6b732 > Reviewed-on: https://chromium-review.googlesource.com/c/1443499 > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> > Cr-Commit-Position: refs/heads/master@{#627570} TBR=dcheng@chromium.org,mattreynolds@chromium.org Change-Id: I2614d74656215a005d906b896d9920faaf5630b5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 890096 Reviewed-on: https://chromium-review.googlesource.com/c/1447040 Reviewed-by: Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Joshua Pawlicki <waffles@chromium.org> Cr-Commit-Position: refs/heads/master@{#627643} [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/BUILD.gn [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/fake_input_service_linux.h [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_collection.cc [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_collection.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_device_filter.h [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_item_state_table.cc [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_item_state_table.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_report_descriptor.cc [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_report_descriptor.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_report_descriptor_item.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_report_item.cc [delete] https://crrev.com/e998ef16c8279ac816bc7fa60f32a23d1fd5d226/services/device/public/cpp/hid/hid_report_item.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/cpp/hid/hid_usage_and_page.h [modify] https://crrev.com/baa99e304404c00d2da2f48153a1afba5d2c91c2/services/device/public/mojom/hid.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b47da7ddf8e3252428c67dc14231011fc5940c9d commit b47da7ddf8e3252428c67dc14231011fc5940c9d Author: Matt Reynolds <mattreynolds@google.com> Date: Fri Feb 01 22:20:05 2019 Reland "Parse HID report descriptor for report info" This is a reland of 6a235ad71f5f34c4b43a5c6be4a78c96cb748921 This reland includes a fix for a use-before-initialization error in HidReportDescriptor that caused devices that do not use report IDs to sometimes report that they did. Original change's description: > Parse HID report descriptor for report info > > The previous HID report descriptor parser was designed to only > extract the maximum size of each type of report and did not preserve > information about the individual fields within a report. This CL > adds a new parser that builds a hierarchical representation of the > reports supported by the HID device. > > BUG=890096 > > Change-Id: I4ac3bf883a843bec00576bfad78958d42f53abc7 > Reviewed-on: https://chromium-review.googlesource.com/c/1257897 > Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> > Cr-Commit-Position: refs/heads/master@{#626816} BUG=890096 Change-Id: I8991162f0bb8c442d4e7cdce5940dd801ab5bfa0 Reviewed-on: https://chromium-review.googlesource.com/c/1446661 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#628478} [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/hid/test_report_descriptors.cc [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/hid/test_report_descriptors.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/BUILD.gn [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/fake_input_service_linux.h [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_collection.cc [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_collection.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_device_filter.h [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_item_state_table.cc [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_item_state_table.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_descriptor.cc [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_descriptor.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_descriptor_item.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_descriptor_unittest.cc [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_item.cc [add] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_report_item.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/cpp/hid/hid_usage_and_page.h [modify] https://crrev.com/b47da7ddf8e3252428c67dc14231011fc5940c9d/services/device/public/mojom/hid.mojom
Comment 1 by mattreynolds@chromium.org, Sep 28