diff options
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 |