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

Unified Diff: public/platform/WebSocketHandleClient.h

Issue 36033003: Notify WebSocket connection failure, Blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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: public/platform/WebSocketHandleClient.h
diff --git a/public/platform/WebSocketHandleClient.h b/public/platform/WebSocketHandleClient.h
index a503c2d015666a81724a71eadc7afc088777da56..5f4da4d88d7084b3aa602b95dc885d74776908ae 100644
--- a/public/platform/WebSocketHandleClient.h
+++ b/public/platform/WebSocketHandleClient.h
@@ -45,11 +45,23 @@ public:
// Called when the handle is opened.
virtual void didConnect(WebSocketHandle*, bool fail, const WebString& selectedProtocol, const WebString& extensions) = 0;
+ // Called when the browser is required to fail the connection.
+ // When this notification arrives the channel is closed as if
+ // didClose(false, 1006, "") arrived.
+ virtual void didFail(WebSocketHandle*, const WebString& message) = 0;
+
// Called when data are received.
virtual void didReceiveData(WebSocketHandle*, bool fin, WebSocketHandle::MessageType, const char* data, size_t /* size */) = 0;
// Called when the handle is closed.
- virtual void didClose(WebSocketHandle*, unsigned short code, const WebString& reason) = 0;
+ // Deperecated: will be removed soon.
+ virtual void didClose(WebSocketHandle* handle, unsigned short code, const WebString& reason)
+ {
+ didClose(handle, false, code, reason);
+ }
+
+ // Called when the handle is closed.
+ virtual void didClose(WebSocketHandle*, bool wasClean, unsigned short code, const WebString& reason) = 0;
virtual void didReceiveFlowControl(WebSocketHandle*, int64_t quota) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698