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; |
}; |