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/ThreadableWebSocketChannel.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h') diff --git a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h b/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h index ded34c85b..9327e2f02 100644 --- a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h +++ b/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h @@ -28,18 +28,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ThreadableWebSocketChannel_h -#define ThreadableWebSocketChannel_h +#pragma once #if ENABLE(WEB_SOCKETS) #include #include -#include namespace JSC { class ArrayBuffer; -class ArrayBufferView; } namespace WebCore { @@ -47,18 +44,18 @@ namespace WebCore { class Blob; class URL; class ScriptExecutionContext; +class SocketProvider; class WebSocketChannelClient; class ThreadableWebSocketChannel { WTF_MAKE_NONCOPYABLE(ThreadableWebSocketChannel); public: + static Ref create(ScriptExecutionContext&, WebSocketChannelClient&, SocketProvider&); ThreadableWebSocketChannel() { } - static PassRefPtr create(ScriptExecutionContext*, WebSocketChannelClient*); enum SendResult { SendSuccess, - SendFail, - InvalidMessage + SendFail }; virtual void connect(const URL&, const String& protocol) = 0; @@ -66,8 +63,8 @@ public: virtual String extensions() = 0; // Will be available after didConnect() callback is invoked. virtual SendResult send(const String& message) = 0; virtual SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength) = 0; - virtual SendResult send(const Blob&) = 0; - virtual unsigned long bufferedAmount() const = 0; + virtual SendResult send(Blob&) = 0; + virtual unsigned bufferedAmount() const = 0; virtual void close(int code, const String& reason) = 0; // Log the reason text and close the connection. Will call didClose(). virtual void fail(const String& reason) = 0; @@ -88,5 +85,3 @@ protected: } // namespace WebCore #endif // ENABLE(WEB_SOCKETS) - -#endif // ThreadableWebSocketChannel_h -- cgit v1.2.1