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

Unified Diff: mojo/services/public/interfaces/network/web_socket.mojom

Issue 540683002: Mojo: Implement the rest of the WebSocket interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « mojo/services/network/web_socket_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/interfaces/network/web_socket.mojom
diff --git a/mojo/services/public/interfaces/network/web_socket.mojom b/mojo/services/public/interfaces/network/web_socket.mojom
index 0e3b42ad5d7c0e9fcb07adf9c706027227219918..87f0d6c055b7b3d642167fa0dd766e3dd7081f5f 100644
--- a/mojo/services/public/interfaces/network/web_socket.mojom
+++ b/mojo/services/public/interfaces/network/web_socket.mojom
@@ -12,13 +12,13 @@ interface WebSocket {
TEXT,
BINARY
};
- const int16 kAbnormalCloseCode = 1006; // stolen from websocket_bridge
+ const uint16 kAbnormalCloseCode = 1006; // stolen from websocket_bridge
Connect(
string url, string[] protocols, string origin, WebSocketClient client);
Send(bool fin, MessageType type, handle<data_pipe_consumer> data);
FlowControl(int64 quota);
- Close(int16 code, string reason);
+ Close(uint16 code, string reason);
};
interface WebSocketClient {
@@ -26,21 +26,14 @@ interface WebSocketClient {
DidReceiveData(
bool fin, WebSocket.MessageType type, handle<data_pipe_consumer> data);
DidReceiveFlowControl(int64 quota);
+ DidFail(string message);
+ DidClose(bool was_clean, uint16 code, string reason);
- // TODO(mpcomplete): add these methods from blink:
- // void didStartOpeningHandshake(WebSocketHandle*, const
- // WebSocketHandshakeRequestInfo&) = 0;
- //
- // void didFinishOpeningHandshake(WebSocketHandle*, const
- // WebSocketHandshakeResponseInfo&) = 0;
- //
- // void didFail(WebSocketHandle* /* handle */, const WebString&
- // message) = 0;
- //
- // void didClose(WebSocketHandle* /* handle */, bool wasClean,
- // unsigned short code, const WebString& reason) = 0;
- //
- // void didStartClosingHandshake(WebSocketHandle*) = 0;
+ // Blink has 3 extra methods that we don't implement, because they are used
+ // for the inspector:
+ // didStartOpeningHandshake
+ // didFinishOpeningHandshake
+ // didStartClosingHandshake
};
}
« no previous file with comments | « mojo/services/network/web_socket_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698