Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 import "data_stream.mojom" | |
| 6 | |
| 7 module device.serial { | |
| 8 | |
| 9 // 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.
| |
| 10 struct SerializedDataSender { | |
| 11 // The control channel to the DataSink to which this DataSender sends data. | |
| 12 DataSink sink; | |
| 13 | |
| 14 // The data pipe this DataSender uses to send data to the DataSink. | |
| 15 handle<data_pipe_producer> data_pipe; | |
| 16 | |
| 17 // The error to report for sends in progress when a fatal error occurs. | |
| 18 int32 fatal_error_value; | |
| 19 }; | |
| 20 | |
| 21 // A serialized form of a JS DataReceiver. | |
| 22 struct SerializedDataReceiver { | |
| 23 // The control channel to the DataSource from which this DataReceiver receives | |
| 24 // data. | |
| 25 DataSource source; | |
| 26 | |
| 27 // The data pipe this DataReceiver uses to receive data from the DataSource. | |
| 28 handle<data_pipe_consumer> data_pipe; | |
| 29 | |
| 30 // The error to report for a receive in progress when a fatal error occurs. | |
| 31 int32 fatal_error_value; | |
| 32 | |
| 33 // The number of bytes this DataReceiver has received from the DataSource. | |
| 34 uint32 bytes_received; | |
| 35 | |
| 36 // Whether a Resume() message needs to be sent to the DataSource for it to | |
| 37 // resume sending data. | |
| 38 bool paused; | |
| 39 }; | |
| 40 | |
| 41 } | |
| OLD | NEW |