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

Unified Diff: chrome/common/extensions/api/experimental_serial.idl

Issue 10827123: Add serial bulk reads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replaced pretend ring buffer with std::deque<>. Created 8 years, 5 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
Index: chrome/common/extensions/api/experimental_serial.idl
diff --git a/chrome/common/extensions/api/experimental_serial.idl b/chrome/common/extensions/api/experimental_serial.idl
index 0fa5e32a68bdf5789aa12c2b6dbe83746f1d5806..62b5e195d3f99f2f3d40b5e71713eb1ede02c6c6 100644
--- a/chrome/common/extensions/api/experimental_serial.idl
+++ b/chrome/common/extensions/api/experimental_serial.idl
@@ -30,6 +30,9 @@ namespace experimental.serial {
dictionary ReadInfo {
// The number of bytes received, or a negative number if an error occurred.
+ // This number will be smaller than the number of bytes requested in the
+ // original read call if the call would need to block to read that number
+ // of bytes.
long bytesRead;
// The data received.
@@ -100,8 +103,11 @@ namespace experimental.serial {
// Reads a byte from the given connection.
// |connectionId| : The id of the connection.
- // |callback| : Called when the byte has been read or the read blocked.
+ // |bytesToRead| : The number of bytes to read.
+ // |callback| : Called when all the requested bytes have been read or
+ // when the read blocks.
static void read(long connectionId,
+ long bytesToRead,
ReadCallback callback);
// Writes a string to the given connection.

Powered by Google App Engine
This is Rietveld 408576698