This issue tracks implementing the Serial API in Blink. Draft specification: https://wicg.github.io/serial/
Reilly, do we have a specific component for this feature? General Blink is for new untriaged incoming bugs for Blink.
I've filed a component request for Blink>Serial in issue 887138 .
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd commit 07b5068f03e0cc8e4606d6b8e1c13f2d119759fd Author: Reilly Grant <reillyg@google.com> Date: Tue Sep 25 19:22:32 2018 Add skeleton for Serial API feature This change adds the beginnings of the Serial API[1] to Blink. The functions on navigator.serial and SerialPort are unimplemented. [1]: https://wicg.github.io/serial Bug: 884928 Change-Id: I76b26337570b07ecf9b265c2876c516058e90ee8 Reviewed-on: https://chromium-review.googlesource.com/1238486 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#594052} [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/public/platform/web_feature.mojom [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/BUILD.gn [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/event_target_modules_names.json5 [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/modules_idl_files.gni [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/BUILD.gn [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/navigator_serial.cc [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/navigator_serial.h [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/navigator_serial.idl [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial.cc [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial.h [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial.idl [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial_options.idl [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial_port.cc [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial_port.h [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial_port.idl [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/serial_port_request_options.idl [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/worker_navigator_serial.cc [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/worker_navigator_serial.h [add] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/modules/serial/worker_navigator_serial.idl [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/third_party/blink/renderer/platform/runtime_enabled_features.json5 [modify] https://crrev.com/07b5068f03e0cc8e4606d6b8e1c13f2d119759fd/tools/metrics/histograms/enums.xml
Removing Android as the Android SDK does not support serial devices.
I filed an issue for the spec' Security Considerations section: https://github.com/WICG/serial/issues/54
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/81b7cee416737cbe051e437096a6038ccc1f1063 commit 81b7cee416737cbe051e437096a6038ccc1f1063 Author: Reilly Grant <reillyg@chromium.org> Date: Mon Jan 07 20:00:41 2019 [serial] Create Blink Mojo interface and basic tests This change adds a SerialService interface that will be used to implement the Serial API in Blink. The implementation is currently stubbed out but basic web tests and browser tests are included. Bug: 884928 Change-Id: Ie98487cc44062e9e36e63efbe065eb9921b146f9 Reviewed-on: https://chromium-review.googlesource.com/c/1391855 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#620438} [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/BUILD.gn [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/frame_host/render_frame_host_impl.h [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/serial/OWNERS [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/serial/serial_browsertest.cc [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/serial/serial_service.cc [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/browser/serial/serial_service.h [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/public/app/mojo/content_browser_manifest.json [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/content/test/BUILD.gn [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/public/mojom/BUILD.gn [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/public/mojom/serial/OWNERS [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/public/mojom/serial/serial.mojom [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/DEPS [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/OWNERS [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/serial.cc [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/serial.h [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/serial_port.cc [modify] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/renderer/modules/serial/serial_port.h [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/web_tests/serial/resources/serial-test-utils.js [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/web_tests/serial/serial_getPorts.html [add] https://crrev.com/81b7cee416737cbe051e437096a6038ccc1f1063/third_party/blink/web_tests/serial/serial_requestPort.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6ef563388cecd96cf6c736fdb30dbe79673740f8 commit 6ef563388cecd96cf6c736fdb30dbe79673740f8 Author: Reilly Grant <reillyg@chromium.org> Date: Tue Jan 08 00:50:00 2019 [serial] Require a user gesture for requestPort() As this method will show a permission prompt it should require an active user gesture. Tests are updated to test this behavior and create a trusted click where necessary. Bug: 884928 Change-Id: Ib3b22ddd229a4fb7141c6eb21840fa8206b918cf Reviewed-on: https://chromium-review.googlesource.com/c/1392169 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by: Ovidio Henriquez <odejesush@chromium.org> Cr-Commit-Position: refs/heads/master@{#620556} [modify] https://crrev.com/6ef563388cecd96cf6c736fdb30dbe79673740f8/third_party/blink/renderer/modules/serial/serial.cc [modify] https://crrev.com/6ef563388cecd96cf6c736fdb30dbe79673740f8/third_party/blink/web_tests/serial/resources/serial-test-utils.js [modify] https://crrev.com/6ef563388cecd96cf6c736fdb30dbe79673740f8/third_party/blink/web_tests/serial/serial_requestPort.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5aa8e19f6527d9648eb7cc40b035ff1ea9e6fe7b commit 5aa8e19f6527d9648eb7cc40b035ff1ea9e6fe7b Author: Reilly Grant <reillyg@chromium.org> Date: Thu Jan 10 02:29:21 2019 [serial] Update WebIDL to use ReadableStream and WritableStream These types are now recognized by the WebIDL compiler and so can be used instead of "any". Bug: 884928 Change-Id: I9c9cca3074f5dd1f6b767c9bd3595e8320fe7ef2 Reviewed-on: https://chromium-review.googlesource.com/c/1401982 Reviewed-by: Ovidio Henriquez <odejesush@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#621426} [modify] https://crrev.com/5aa8e19f6527d9648eb7cc40b035ff1ea9e6fe7b/third_party/blink/renderer/modules/serial/serial_port.cc [modify] https://crrev.com/5aa8e19f6527d9648eb7cc40b035ff1ea9e6fe7b/third_party/blink/renderer/modules/serial/serial_port.h [modify] https://crrev.com/5aa8e19f6527d9648eb7cc40b035ff1ea9e6fe7b/third_party/blink/renderer/modules/serial/serial_port.idl
Comment 1 by nzolghadr@chromium.org
, Sep 19