From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../Modules/websockets/WebSocketChannelClient.h | 41 ++++++++++------------ 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'Source/WebCore/Modules/websockets/WebSocketChannelClient.h') 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 -#include #include namespace WebCore { - class WebSocketChannelClient { - public: - virtual ~WebSocketChannelClient() { } - virtual void didConnect() { } - virtual void didReceiveMessage(const String&) { } - virtual void didReceiveBinaryData(PassOwnPtr>) { } - 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&&) = 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 -- cgit v1.2.1