| Index: Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h
|
| ===================================================================
|
| --- Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h (revision 115611)
|
| +++ Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h (working copy)
|
| @@ -36,6 +36,7 @@
|
| #include "PlatformString.h"
|
| #include "ThreadableWebSocketChannel.h"
|
| #include "WebSocketChannelClient.h"
|
| +#include "WorkerContext.h"
|
|
|
| #include <wtf/PassRefPtr.h>
|
| #include <wtf/RefCounted.h>
|
| @@ -75,14 +76,6 @@
|
| virtual void suspend() OVERRIDE;
|
| virtual void resume() OVERRIDE;
|
|
|
| - using RefCounted<WorkerThreadableWebSocketChannel>::ref;
|
| - using RefCounted<WorkerThreadableWebSocketChannel>::deref;
|
| -
|
| -protected:
|
| - virtual void refThreadableWebSocketChannel() { ref(); }
|
| - virtual void derefThreadableWebSocketChannel() { deref(); }
|
| -
|
| -private:
|
| // Generated by the bridge. The Peer and its bridge should have identical
|
| // lifetimes.
|
| class Peer : public WebSocketChannelClient {
|
| @@ -123,6 +116,14 @@
|
| String m_taskMode;
|
| };
|
|
|
| + using RefCounted<WorkerThreadableWebSocketChannel>::ref;
|
| + using RefCounted<WorkerThreadableWebSocketChannel>::deref;
|
| +
|
| +protected:
|
| + virtual void refThreadableWebSocketChannel() { ref(); }
|
| + virtual void derefThreadableWebSocketChannel() { deref(); }
|
| +
|
| +private:
|
| // Bridge for Peer. Running on the worker thread.
|
| class Bridge : public RefCounted<Bridge> {
|
| public:
|
| @@ -131,6 +132,7 @@
|
| return adoptRef(new Bridge(workerClientWrapper, workerContext, taskMode));
|
| }
|
| ~Bridge();
|
| + void initialize();
|
| void connect(const KURL&, const String& protocol);
|
| ThreadableWebSocketChannel::SendResult send(const String& message);
|
| ThreadableWebSocketChannel::SendResult send(const ArrayBuffer&);
|
| @@ -151,7 +153,7 @@
|
| static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, bool useHixie76Protocol);
|
|
|
| // Executed on the main thread to create a Peer for this bridge.
|
| - static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode);
|
| + static void mainThreadInitialize(ScriptExecutionContext*, WorkerLoaderProxy*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode);
|
|
|
| // Executed on the worker context's thread.
|
| void clearClientWrapper();
|
|
|