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

Side by Side Diff: device/serial/data_stream.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: 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module device.serial { 5 module device.serial {
6 6
7 [Client=DataSourceClient] 7 [Client=DataSourceClient]
8 interface DataSource { 8 interface DataSource {
9 // Initializes this DataSource with a data pipe handle to use for data 9 // Initializes this DataSource with a data pipe handle to use for data
10 // transmission. 10 // transmission.
(...skipping 25 matching lines...) Expand all
36 // Reports that the sink has successfully received |bytes_sent| bytes of data. 36 // Reports that the sink has successfully received |bytes_sent| bytes of data.
37 ReportBytesSent(uint32 bytes_sent); 37 ReportBytesSent(uint32 bytes_sent);
38 38
39 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0) 39 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0)
40 // and encountered an error: |error|. The client should respond with 40 // and encountered an error: |error|. The client should respond with
41 // |bytes_to_flush|, the number of bytes enqueued in the data pipe but not yet 41 // |bytes_to_flush|, the number of bytes enqueued in the data pipe but not yet
42 // acked so the correct number of bytes can be flushed from the pipe. 42 // acked so the correct number of bytes can be flushed from the pipe.
43 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (uint32 bytes_to_fl ush); 43 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (uint32 bytes_to_fl ush);
44 }; 44 };
45 45
46 struct SerializedDataSender {
raymes 2014/09/17 02:05:04 As noted I think it would be good to move these to
Sam McNally 2014/09/17 08:07:14 Done.
47 handle<message_pipe> sink;
48 handle<data_pipe_producer> data_pipe;
49 int32 fatal_error_value;
50 bool shut_down;
51 };
52
53 struct SerializedDataReceiver {
54 handle<message_pipe> source;
55 handle<data_pipe_consumer> data_pipe;
56 int32 fatal_error_value;
57 uint32 bytes_received;
58 bool paused;
59 bool shut_down;
60 };
61
46 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698