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

Unified 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: clean up jsdoc 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/serial/BUILD.gn ('k') | device/serial/serial.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..381347b5da065317ddfa1db9d7a982792b81eec2
--- /dev/null
+++ b/device/serial/data_stream_serialization.mojom
@@ -0,0 +1,53 @@
+// 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 DataSender.
+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 pending receive error.
+struct PendingReceiveError {
+ // The value of the error.
+ int32 error;
+
+ // The location of the error.
+ uint32 offset;
+};
+
+// A serialized form of a 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;
+
+ // The pending receive error if there is one.
+ PendingReceiveError? pending_error;
+};
+
+}
« no previous file with comments | « device/serial/BUILD.gn ('k') | device/serial/serial.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698