Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Side by Side Diff: device/serial/data_stream_serialization.mojom

Issue 571333002: Add serialization support to the JS DataSender and DataReceiver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stash-service
Patch Set: address comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 DataSender.
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 pending receive error.
22 struct PendingReceiveError {
23 // The value of the error.
24 int32 error;
25
26 // The location of the error.
27 uint32 offset;
28 };
29
30 // A serialized form of a DataReceiver.
31 struct SerializedDataReceiver {
32 // The control channel to the DataSource from which this DataReceiver receives
33 // data.
34 DataSource source;
35
36 // The data pipe this DataReceiver uses to receive data from the DataSource.
37 handle<data_pipe_consumer> data_pipe;
38
39 // The error to report for a receive in progress when a fatal error occurs.
40 int32 fatal_error_value;
41
42 // The number of bytes this DataReceiver has received from the DataSource.
43 uint32 bytes_received;
44
45 // Whether a Resume() message needs to be sent to the DataSource for it to
46 // resume sending data.
47 bool paused;
48
49 // The pending receive error if there is one.
50 PendingReceiveError? pending_error;
51 };
52
53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698