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

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
« no previous file with comments | « Source/modules/websockets/NewWebSocketChannelImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebSocketHandleClient.h
diff --git a/public/platform/WebSocketHandleClient.h b/public/platform/WebSocketHandleClient.h
index a503c2d015666a81724a71eadc7afc088777da56..4d2e9c0ba9b32aeb4465b43f9e79bf331f780ae5 100644
--- a/public/platform/WebSocketHandleClient.h
+++ b/public/platform/WebSocketHandleClient.h
@@ -45,11 +45,22 @@ 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.
+ // This is just a notification and |didClose| will be called then.
+ virtual void didFail(WebSocketHandle*, const WebString& message) = 0;
abarth-chromium 2013/10/23 18:26:24 Why have a separate didFail call? It seems strang
yhirano 2013/10/24 00:43:32 DropChannel - didClose is a special message: it re
yhirano 2013/10/31 03:34:50 I changed my mind. Done.
+
// 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 fail, unsigned short code, const WebString& reason) = 0;
tyoshino (SeeGerritForStatus) 2013/10/24 09:08:44 fail -> wasClean?
yhirano 2013/10/24 09:11:35 Thanks, done.
virtual void didReceiveFlowControl(WebSocketHandle*, int64_t quota) = 0;
};
« no previous file with comments | « Source/modules/websockets/NewWebSocketChannelImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698