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.
Comment 1 by reillyg@chromium.org
, Nov 27