Chromium Code Reviews| Index: device/serial/data_stream_serialization.mojom |
| diff --git a/device/serial/data_stream_serialization.mojom b/device/serial/data_stream_serialization.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..82bf3a4ba0ecd226f6a7934f858b9ac10e43c088 |
| --- /dev/null |
| +++ b/device/serial/data_stream_serialization.mojom |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +import "data_stream.mojom" |
| + |
| +module device.serial { |
| + |
| +// A serialized form of a JS DataSender. |
|
raymes
2014/09/18 03:16:06
does it have to be "js"? The C++ serialization wou
Sam McNally
2014/09/19 04:58:46
Done.
|
| +struct SerializedDataSender { |
| + // The control channel to the DataSink to which this DataSender sends data. |
| + DataSink sink; |
| + |
| + // The data pipe this DataSender uses to send data to the DataSink. |
| + handle<data_pipe_producer> data_pipe; |
| + |
| + // The error to report for sends in progress when a fatal error occurs. |
| + int32 fatal_error_value; |
| +}; |
| + |
| +// A serialized form of a JS DataReceiver. |
| +struct SerializedDataReceiver { |
| + // The control channel to the DataSource from which this DataReceiver receives |
| + // data. |
| + DataSource source; |
| + |
| + // The data pipe this DataReceiver uses to receive data from the DataSource. |
| + handle<data_pipe_consumer> data_pipe; |
| + |
| + // The error to report for a receive in progress when a fatal error occurs. |
| + int32 fatal_error_value; |
| + |
| + // The number of bytes this DataReceiver has received from the DataSource. |
| + uint32 bytes_received; |
| + |
| + // Whether a Resume() message needs to be sent to the DataSource for it to |
| + // resume sending data. |
| + bool paused; |
| +}; |
| + |
| +} |