GoogleChromeLabs / chromeos_smart_card_connector

Smart Card Connector App for Chrome OS
https://chrome.google.com/webstore/detail/smart-card-connector/khpfeaanjngmcnplbdlpegiifgpfgdco
Apache License 2.0
134 stars 49 forks source link

[libusb] Support proxying through message channels #1139

Closed emaxx-google closed 5 months ago

emaxx-google commented 6 months ago

Perform data massaging when handling USB requests, so that they can be sent through message pipes. WebUSB uses ArrayBuffer and DataView types for input/output parameters, however for sending via extension messages we have to convert them to/from arrays of integers-bytes.

The underlying motivation is the migration to manifest v3 and WebAssembly, because due to multi-threading issues we have to move the WebAssembly module from the Service Worker (where most API calls, including WebUSB APIs will happen) into a separate Offscreen Document. So each USB request will have to be proxied as a request-response pair of messages between the Offscreen Document and the Service Worker.

github-actions[bot] commented 6 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.34% lines.

github-actions[bot] commented 6 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

github-actions[bot] commented 6 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.35% lines.

github-actions[bot] commented 5 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.36% lines.