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

Unified Diff: third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h

Issue 2811993007: Worker: Remove cross-thread PostTask functions from WorkerLoaderProxy (Closed)
Patch Set: address review comments Created 3 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: third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
diff --git a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
index d35f36b887db36a8462cddd24aa826d3d67c3c4c..80f42f030b6f84ccd6e126986b9045c077848043 100644
--- a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
+++ b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
@@ -34,6 +34,7 @@
#include <stdint.h>
#include <memory>
#include "bindings/core/v8/SourceLocation.h"
+#include "core/workers/ParentFrameTaskRunners.h"
#include "core/workers/WorkerThreadLifecycleObserver.h"
#include "modules/websockets/WebSocketChannel.h"
#include "modules/websockets/WebSocketChannelClient.h"
@@ -96,7 +97,10 @@ class WorkerWebSocketChannel final : public WebSocketChannel {
WTF_MAKE_NONCOPYABLE(Peer);
public:
- Peer(Bridge*, PassRefPtr<WorkerLoaderProxy>, WorkerThreadLifecycleContext*);
+ Peer(Bridge*,
+ PassRefPtr<WorkerLoaderProxy>,
+ RefPtr<WebTaskRunner>,
+ WorkerThreadLifecycleContext*);
~Peer() override;
// SourceLocation parameter may be shown when the connection fails.
@@ -134,6 +138,7 @@ class WorkerWebSocketChannel final : public WebSocketChannel {
private:
CrossThreadWeakPersistent<Bridge> bridge_;
RefPtr<WorkerLoaderProxy> loader_proxy_;
+ RefPtr<WebTaskRunner> worker_networking_task_runner_;
Member<WebSocketChannel> main_web_socket_channel_;
};
@@ -163,6 +168,7 @@ class WorkerWebSocketChannel final : public WebSocketChannel {
void ConnectOnMainThread(std::unique_ptr<SourceLocation>,
RefPtr<WorkerLoaderProxy>,
+ RefPtr<WebTaskRunner>,
WorkerThreadLifecycleContext*,
const KURL&,
const String& protocol,
@@ -179,6 +185,7 @@ class WorkerWebSocketChannel final : public WebSocketChannel {
Member<WebSocketChannelClient> client_;
Member<WorkerGlobalScope> worker_global_scope_;
RefPtr<WorkerLoaderProxy> loader_proxy_;
+ CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_;
CrossThreadPersistent<Peer> peer_;
};

Powered by Google App Engine
This is Rietveld 408576698