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

Unified Diff: public/platform/WebSocketHandleClient.h

Issue 23684002: Introduce WebSocketHandle and WebSocketHandleClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « public/platform/WebSocketHandle.h ('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/WebSocketStreamHandleClient.h b/public/platform/WebSocketHandleClient.h
similarity index 66%
copy from public/platform/WebSocketStreamHandleClient.h
copy to public/platform/WebSocketHandleClient.h
index 4f392411056f2160f1691d48470a2f2807c8c899..f06606264365ada1d1d2d65cbdd25cc5b81cb26d 100644
--- a/public/platform/WebSocketStreamHandleClient.h
+++ b/public/platform/WebSocketHandleClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,37 +28,33 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSocketStreamHandleClient_h
-#define WebSocketStreamHandleClient_h
+#ifndef WebSocketHandleClient_h
+#define WebSocketHandleClient_h
#include "WebCommon.h"
+#include "public/platform/WebSocketHandle.h"
namespace WebKit {
class WebData;
-class WebSocketStreamError;
-class WebSocketStreamHandle;
+class WebString;
class WebURL;
-class WebSocketStreamHandleClient {
+// FIXME: This class should replace WebSocketStreamHandleClient.
+class WebSocketHandleClient {
public:
-
- // Called when Socket Stream is opened.
- virtual void didOpenStream(WebSocketStreamHandle*, int /* maxPendingSendAllowed */) = 0;
-
- // Called when |amountSent| bytes are sent.
- virtual void didSendData(WebSocketStreamHandle*, int /* amountSent */) = 0;
+ // Called when the handle is opened.
+ virtual void didConnect(WebSocketHandle*, bool succeed, const WebString& selectedProtocol, const WebString& extensions) = 0;
// Called when data are received.
- virtual void didReceiveData(WebSocketStreamHandle*, const WebData&) = 0;
+ virtual void didReceiveData(WebSocketHandle*, WebSocketHandle::MessageType, const char* data, size_t /* size */, bool fin) = 0;
- // Called when Socket Stream is closed.
- virtual void didClose(WebSocketStreamHandle*) = 0;
+ // Called when the handle is closed.
+ virtual void didClose(WebSocketHandle*, unsigned short code, const WebString& reason) = 0;
- // Called when Socket Stream has an error.
- virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&) = 0;
+ virtual void didReceiveFlowControl(WebSocketHandle*, int64_t quota) = 0;
};
} // namespace WebKit
-#endif
+#endif // WebSocketHandleClient_h
« no previous file with comments | « public/platform/WebSocketHandle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698