New issue
Advanced search Search tips

Issue 908833 link

Starred by 4 users

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Task

Blocking:
issue 884928



Sign in to add a comment

Serial Mojo interface changes for W3C Serial API

Project Member Reported by reillyg@chromium.org, Nov 27

Issue description

A number of changes should be made in order to enable a clean implementation of the W3C Serial API in Blink. This work can proceed in parallel to implementation of the Serial API by porting the chrome.serial API to the new Mojo interface as well.

Proposed changes:

* The SerialDeviceEnumerator interface should be renamed to SerialPortManager.
* The SerialDeviceInfo struct should be renamed to SerialPortInfo.
* The SerialIoHandler interface should be renamed to SerialPort.
* The SerialPortInfo::port field should be replaced by a |guid| field so as to uniquely identify a serial port without referring to its OS identifier.
* The SerialPort::Open method should no longer take a |port| parameter. Instead a SerialPortManager::GetPort(string guid, SerialPort& port_request) method will attach a pipe to an implementation of SerialPort for the given port.
* The SerialPort::Read and Write methods should be removed. Instead the Open method should take a pair of data pipe consumer and producer handles that will carry data read from and written to the port.
 
Blocking: 884928
Cc: donna...@intel.com
Owner: donna...@intel.com
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5cf349115227577bb6b972d12212514e215c963c

commit 5cf349115227577bb6b972d12212514e215c963c
Author: Donna Wu <donna.wu@intel.com>
Date: Tue Dec 11 02:53:19 2018

Rename Serial Mojo interfaces for W3C Serial API.

This CL is a preparation for W3C Serial API implementation in Blink.
Several Serial Mojo interfaces have been renamed:
* SerialDeviceEnumerator --> SerialPortManager.
* SerialDeviceInfo --> SerialPortInfo.
* SerialIoHandler --> SerialPort.
* SerialDeviceControlSignals --> SerialPortControlSignals

BUG=908833

Change-Id: Ie95722f9f368d049006da8cfe19ec15159895b9d
Reviewed-on: https://chromium-review.googlesource.com/c/1365075
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#615403}
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_linux.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_linux.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_mac.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_mac.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_unittest.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_win.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_device_enumerator_win.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_io_handler.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_io_handler_posix.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_io_handler_posix.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_io_handler_win.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/device/serial/serial_io_handler_win.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/serial/serial_api.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/serial/serial_api.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/serial/serial_apitest.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/serial/serial_connection.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/serial/serial_connection.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/webcam_private/visca_webcam.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/webcam_private/visca_webcam.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/extensions/browser/api/webcam_private/visca_webcam_unittest.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/BUILD.gn
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/device_service.cc
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/device_service.h
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/manifest.json
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/public/mojom/serial.mojom
[modify] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/BUILD.gn
[delete] https://crrev.com/e3034da0612ec7d327515331889e2d1579eaf818/services/device/serial/serial_device_enumerator_impl.h
[rename] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_impl.cc
[rename] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_impl.h
[rename] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_impl_unittest.cc
[rename] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_manager_impl.cc
[add] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_manager_impl.h
[rename] https://crrev.com/5cf349115227577bb6b972d12212514e215c963c/services/device/serial/serial_port_manager_impl_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe9784bb4b1675050c969f69ba172f8c5275611b

commit fe9784bb4b1675050c969f69ba172f8c5275611b
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Dec 12 15:52:53 2018

Add GetPort(...) for device::mojom::SerialPortManager.

A new method GetPort(...) for SerialPortManager Mojo interface is
added. The argument list for SerialPort::Open(...) method has been
changed and the related code has been adjusted accordingly.

BUG=908833

Change-Id: Iba156b1abb0e636ee623cd3de6eae6d0773722ff
Reviewed-on: https://chromium-review.googlesource.com/c/1369711
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#615905}
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/serial/serial_api.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/serial/serial_api.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/serial/serial_apitest.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/serial/serial_connection.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/serial/serial_connection.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/webcam_private/visca_webcam.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/webcam_private/visca_webcam.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/extensions/browser/api/webcam_private/visca_webcam_unittest.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/device_service.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/device_service.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/manifest.json
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/public/mojom/serial.mojom
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_impl.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_impl.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_impl_unittest.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_manager_impl.cc
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_manager_impl.h
[modify] https://crrev.com/fe9784bb4b1675050c969f69ba172f8c5275611b/services/device/serial/serial_port_manager_impl_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8

commit e58c0245986568bc0f543a7b7a7b8e300ec3e0c8
Author: Donna Wu <donna.wu@intel.com>
Date: Mon Jan 07 08:00:51 2019

Add |token| field in SerialPortInfo and use it in GetPort().

A new field |token| has been added in SerialPortInfo and used in
GetPort() as unique identify of a serial port without referring
to its OS identifier.

BUG=908833

Change-Id: I5d46f5601a5453ae2f8f937713dd87b12a3849f2
Reviewed-on: https://chromium-review.googlesource.com/c/1375456
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620271}
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/chrome/test/data/extensions/api_test/serial/real_hardware/background.js
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/api_resource_manager.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/BUILD.gn
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_api.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_api.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_apitest.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_connection.h
[delete] https://crrev.com/8e5b3d54483039ad20d7fb808b0c48f90fc7eb52/extensions/browser/api/serial/serial_event_dispatcher.cc
[delete] https://crrev.com/8e5b3d54483039ad20d7fb808b0c48f90fc7eb52/extensions/browser/api/serial/serial_event_dispatcher.h
[add] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_port_manager.cc
[add] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/serial/serial_port_manager.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/webcam_private/visca_webcam.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/webcam_private/visca_webcam.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/public/mojom/serial.mojom
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_linux.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_linux.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_mac.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_mac.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_win.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_device_enumerator_win.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler_posix.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler_posix.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler_posix_unittest.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler_win.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_io_handler_win.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_port_impl.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_port_impl.h
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_port_impl_unittest.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_port_manager_impl.cc
[modify] https://crrev.com/e58c0245986568bc0f543a7b7a7b8e300ec3e0c8/services/device/serial/serial_port_manager_impl.h

Sign in to add a comment