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

Unified Diff: third_party/WebKit/Source/modules/websockets/WebSocketChannel.h

Issue 1666893003: [ABANDONED] WebSocket Blob receive in the browser process: renderer changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@websocket_blob_receive_host_merged
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
index d41e3c5e6d85f3a7e3e976f5b680930b54dcbb8f..5031e427e42cb9a16dcd236a1d99208930d0f520 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
@@ -70,6 +70,11 @@ public:
CloseEventCodeMaximumUserDefined = 4999
};
+ enum BinaryType {
+ BinaryTypeBlob,
+ BinaryTypeArrayBuffer,
+ };
+
virtual bool connect(const KURL&, const String& protocol) = 0;
virtual void send(const CString&) = 0;
virtual void send(const DOMArrayBuffer&, unsigned byteOffset, unsigned byteLength) = 0;
@@ -82,6 +87,11 @@ public:
// Do not call |send| after calling this method.
virtual void close(int code, const String& reason) = 0;
+ // Change binary mode. This controls whether didReceiveArrayBuffer or didReceiveBlob is called in responnse to a
+ // binary message. The effect is not instant, so the WebSocketChannelClient has to be prepared to receive a Blob
+ // even after changing binary type to ArrayBuffer, and vice-versa.
+ virtual void changeBinaryType(BinaryType) = 0;
+
// Log the reason text and close the connection. Will call didClose().
// The MessageLevel parameter will be used for the level of the message
// shown at the devtool console.

Powered by Google App Engine
This is Rietveld 408576698