summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h')
-rw-r--r--Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h17
1 files changed, 6 insertions, 11 deletions
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 <wtf/Forward.h>
#include <wtf/Noncopyable.h>
-#include <wtf/PassRefPtr.h>
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<ThreadableWebSocketChannel> create(ScriptExecutionContext&, WebSocketChannelClient&, SocketProvider&);
ThreadableWebSocketChannel() { }
- static PassRefPtr<ThreadableWebSocketChannel> 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