diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/websockets/WebSocketChannelClient.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/Modules/websockets/WebSocketChannelClient.h')
-rw-r--r-- | Source/WebCore/Modules/websockets/WebSocketChannelClient.h | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/Source/WebCore/Modules/websockets/WebSocketChannelClient.h b/Source/WebCore/Modules/websockets/WebSocketChannelClient.h index 46641c06c..b7b7fcd2d 100644 --- a/Source/WebCore/Modules/websockets/WebSocketChannelClient.h +++ b/Source/WebCore/Modules/websockets/WebSocketChannelClient.h @@ -28,38 +28,35 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebSocketChannelClient_h -#define WebSocketChannelClient_h +#pragma once #if ENABLE(WEB_SOCKETS) #include <wtf/Forward.h> -#include <wtf/PassOwnPtr.h> #include <wtf/Vector.h> namespace WebCore { - class WebSocketChannelClient { - public: - virtual ~WebSocketChannelClient() { } - virtual void didConnect() { } - virtual void didReceiveMessage(const String&) { } - virtual void didReceiveBinaryData(PassOwnPtr<Vector<char>>) { } - virtual void didReceiveMessageError() { } - virtual void didUpdateBufferedAmount(unsigned long /* bufferedAmount */) { } - virtual void didStartClosingHandshake() { } - enum ClosingHandshakeCompletionStatus { - ClosingHandshakeIncomplete, - ClosingHandshakeComplete - }; - virtual void didClose(unsigned long /* unhandledBufferedAmount */, ClosingHandshakeCompletionStatus, unsigned short /* code */, const String& /* reason */) { } - - protected: - WebSocketChannelClient() { } +class WebSocketChannelClient { +public: + virtual ~WebSocketChannelClient() { } + virtual void didConnect() = 0; + virtual void didReceiveMessage(const String&) = 0; + virtual void didReceiveBinaryData(Vector<uint8_t>&&) = 0; + virtual void didReceiveMessageError() = 0; + virtual void didUpdateBufferedAmount(unsigned bufferedAmount) = 0; + virtual void didStartClosingHandshake() = 0; + enum ClosingHandshakeCompletionStatus { + ClosingHandshakeIncomplete, + ClosingHandshakeComplete }; + virtual void didClose(unsigned unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) = 0; + virtual void didUpgradeURL() = 0; + +protected: + WebSocketChannelClient() { } +}; } // namespace WebCore #endif // ENABLE(WEB_SOCKETS) - -#endif // WebSocketChannelClient_h |