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

Unified Diff: content/child/push_messaging/push_dispatcher.h

Issue 892543002: workers: Introduce a WorkerMessageFilter to ease routing/processing worker messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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: content/child/push_messaging/push_dispatcher.h
diff --git a/content/child/push_messaging/push_dispatcher.h b/content/child/push_messaging/push_dispatcher.h
index db598fb7fabe210ca040a67bd859d7b659d873d9..5eaf550c2f7c74c2f836aa4e84069c252ea9b416 100644
--- a/content/child/push_messaging/push_dispatcher.h
+++ b/content/child/push_messaging/push_dispatcher.h
@@ -7,20 +7,12 @@
#include <map>
-#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "content/child/child_message_filter.h"
-#include "content/public/common/push_messaging_status.h"
-
-namespace base {
-class MessageLoopProxy;
-}
+#include "content/child/worker_thread_message_filter.h"
namespace content {
-class ThreadSafeSender;
-
-class PushDispatcher : public ChildMessageFilter {
+class PushDispatcher : public WorkerThreadMessageFilter {
public:
explicit PushDispatcher(ThreadSafeSender* thread_safe_sender);
@@ -34,15 +26,11 @@ class PushDispatcher : public ChildMessageFilter {
~PushDispatcher() override;
private:
- bool ShouldHandleMessage(const IPC::Message& msg);
-
- // ChildMessageFilter implementation.
- base::TaskRunner* OverrideTaskRunnerForMessage(
- const IPC::Message& msg) override;
- bool OnMessageReceived(const IPC::Message& msg) override;
-
- scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
- scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+ // WorkerThreadMessageFilter:
+ bool ShouldHandleMessage(const IPC::Message& msg) const override;
+ void OnFilteredMessageReceived(const IPC::Message& msg) override;
+ bool GetWorkerThreadIdForMessage(const IPC::Message& msg,
+ int* ipc_thread_id) override;
base::Lock request_id_map_lock_;
std::map<int, int> request_id_map_; // Maps request id to thread id.
« no previous file with comments | « content/child/notifications/notification_dispatcher.cc ('k') | content/child/push_messaging/push_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698