Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h

Issue 10270006: Merge 113138 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698