| 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..3bde8ffdc99fe41bf34a9653f1f32eb071ab0757 100644
|
| --- a/content/browser/shared_worker/shared_worker_message_filter.h
|
| +++ b/content/browser/shared_worker/shared_worker_message_filter.h
|
| @@ -8,11 +8,11 @@
|
| #include "base/macros.h"
|
| #include "content/browser/shared_worker/worker_storage_partition.h"
|
| #include "content/common/content_export.h"
|
| +#include "content/common/shared_worker.mojom.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| +#include "mojo/public/cpp/bindings/associated_binding_set.h"
|
|
|
| class GURL;
|
| -struct ViewHostMsg_CreateWorker_Params;
|
| -struct ViewHostMsg_CreateWorker_Reply;
|
|
|
| namespace content {
|
| class MessagePortMessageFilter;
|
| @@ -20,7 +20,9 @@ class ResourceContext;
|
|
|
| // Handles SharedWorker related IPC messages for one renderer process by
|
| // forwarding them to the SharedWorkerServiceImpl singleton.
|
| -class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter {
|
| +class CONTENT_EXPORT SharedWorkerMessageFilter
|
| + : public mojom::SharedWorkerMessageFilter,
|
| + public BrowserMessageFilter {
|
| public:
|
| SharedWorkerMessageFilter(int render_process_id,
|
| ResourceContext* resource_context,
|
| @@ -42,12 +44,15 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter {
|
| // This is protected, so we can define sub classes for testing.
|
| ~SharedWorkerMessageFilter() override;
|
|
|
| + public:
|
| + // mojom::SharedWorkerMessageFilter implementation.
|
| + void OnCreateWorker(mojom::SharedWorkerCreateParamsPtr params,
|
| + const OnCreateWorkerCallback& callback) override;
|
| + void OnConnectToWorker(int route_id, int sent_message_port_id) override;
|
| + void OnDocumentDetached(uint64_t document_id) override;
|
| +
|
| private:
|
| // Message handlers.
|
| - void OnCreateWorker(const ViewHostMsg_CreateWorker_Params& params,
|
| - ViewHostMsg_CreateWorker_Reply* reply);
|
| - void OnConnectToWorker(int route_id, int sent_message_port_id);
|
| - void OnDocumentDetached(unsigned long long document_id);
|
| void OnWorkerContextClosed(int worker_route_id);
|
| void OnWorkerContextDestroyed(int worker_route_id);
|
|
|
| @@ -63,11 +68,15 @@ class CONTENT_EXPORT SharedWorkerMessageFilter : public BrowserMessageFilter {
|
| const base::string16& name,
|
| bool* result);
|
|
|
| + void AddMojoBinding(mojo::ScopedInterfaceEndpointHandle handle);
|
| +
|
| const int render_process_id_;
|
| ResourceContext* const resource_context_;
|
| const WorkerStoragePartition partition_;
|
| MessagePortMessageFilter* const message_port_message_filter_;
|
|
|
| + mojo::AssociatedBindingSet<mojom::SharedWorkerMessageFilter> bindings_;
|
| +
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(SharedWorkerMessageFilter);
|
| };
|
|
|
|
|