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

Unified Diff: content/child/websocket_dispatcher.h

Issue 2000113002: Delegate WebSocket message handlers to the loading task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | content/child/websocket_dispatcher.cc » ('j') | content/child/websocket_dispatcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/websocket_dispatcher.h
diff --git a/content/child/websocket_dispatcher.h b/content/child/websocket_dispatcher.h
index e40053de41ca0a7e328185e93e110a4a8be932ba..00d35e510f00ad84f665f8c2c1b0fb5b2668c44e 100644
--- a/content/child/websocket_dispatcher.h
+++ b/content/child/websocket_dispatcher.h
@@ -12,6 +12,8 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
#include "ipc/ipc_listener.h"
namespace content {
@@ -34,11 +36,16 @@ class WebSocketDispatcher : public IPC::Listener {
// IPC::Listener implementation.
bool OnMessageReceived(const IPC::Message& msg) override;
+ void SetLoadingTaskRunner(scoped_refptr<base::SingleThreadTaskRunner>
+ loading_task_runner);
+
private:
WebSocketBridge* GetBridge(int channel_id, uint32_t type);
+ void OnMessageReceivedOnLoadingTaskRunner(IPC::Message msg);
std::map<int, WebSocketBridge*> bridges_;
int channel_id_max_;
+ scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcher);
};
« no previous file with comments | « no previous file | content/child/websocket_dispatcher.cc » ('j') | content/child/websocket_dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698