Index: content/browser/shared_worker/shared_worker_message_filter.h |
diff --git a/content/browser/shared_worker/shared_worker_message_filter.h b/content/browser/shared_worker/shared_worker_message_filter.h |
index eaf3aacfd855e05f6868390d0314c77e7144b024..2394b55f8d3c8f436c6552587ae9c424d492cfbf 100644 |
--- a/content/browser/shared_worker/shared_worker_message_filter.h |
+++ b/content/browser/shared_worker/shared_worker_message_filter.h |
@@ -15,17 +15,19 @@ struct ViewHostMsg_CreateWorker_Params; |
struct ViewHostMsg_CreateWorker_Reply; |
namespace content { |
-class MessagePortMessageFilter; |
+class MessagePort; |
class ResourceContext; |
// Handles SharedWorker related IPC messages for one renderer process by |
// forwarding them to the SharedWorkerServiceImpl singleton. |
class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter { |
public: |
+ typedef base::Callback<int(void)> NextRoutingIDCallback; |
+ |
SharedWorkerMessageFilter(int render_process_id, |
ResourceContext* resource_context, |
const WorkerStoragePartition& partition, |
- MessagePortMessageFilter* message_port_filter); |
+ const NextRoutingIDCallback& callback); |
// BrowserMessageFilter implementation. |
void OnChannelClosing() override; |
@@ -34,10 +36,6 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter { |
int GetNextRoutingID(); |
int render_process_id() const { return render_process_id_; } |
- MessagePortMessageFilter* message_port_message_filter() const { |
- return message_port_message_filter_; |
- } |
- |
protected: |
// This is protected, so we can define sub classes for testing. |
~SharedWorkerMessageFilter() override; |
@@ -46,7 +44,7 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter { |
// Message handlers. |
void OnCreateWorker(const ViewHostMsg_CreateWorker_Params& params, |
ViewHostMsg_CreateWorker_Reply* reply); |
- void OnConnectToWorker(int route_id, int sent_message_port_id); |
+ void OnConnectToWorker(int worker_route_id, const MessagePort& port); |
void OnDocumentDetached(unsigned long long document_id); |
void OnWorkerContextClosed(int worker_route_id); |
void OnWorkerContextDestroyed(int worker_route_id); |
@@ -54,7 +52,7 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter { |
void OnWorkerReadyForInspection(int worker_route_id); |
void OnWorkerScriptLoaded(int worker_route_id); |
void OnWorkerScriptLoadFailed(int worker_route_id); |
- void OnWorkerConnected(int message_port_id, int worker_route_id); |
+ void OnWorkerConnected(int connection_request_id, int worker_route_id); |
void OnRequestFileSystemAccess(int worker_route_id, |
const GURL& url, |
IPC::Message* reply_msg); |
@@ -66,7 +64,7 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter { |
const int render_process_id_; |
ResourceContext* const resource_context_; |
const WorkerStoragePartition partition_; |
- MessagePortMessageFilter* const message_port_message_filter_; |
+ NextRoutingIDCallback next_routing_id_callback_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(SharedWorkerMessageFilter); |
}; |