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

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Eliminate unnecessary PostTask Created 3 years, 10 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/browser/service_worker/service_worker_dispatcher_host.h
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index ae1e55116f142889633be889b7ea02b60b343163..1d718ae719bef47cb3494d3891db5a872b286803 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -30,7 +30,7 @@ class Origin;
namespace content {
-class MessagePortMessageFilter;
+class MessagePort;
class ResourceContext;
class ServiceWorkerContextCore;
class ServiceWorkerContextWrapper;
@@ -49,7 +49,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
public:
ServiceWorkerDispatcherHost(
int render_process_id,
- MessagePortMessageFilter* message_port_message_filter,
ResourceContext* resource_context);
void Init(ServiceWorkerContextWrapper* context_wrapper);
@@ -81,10 +80,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
base::WeakPtr<ServiceWorkerProviderHost> provider_host,
ServiceWorkerRegistration* registration);
- MessagePortMessageFilter* message_port_message_filter() {
- return message_port_message_filter_;
- }
-
protected:
~ServiceWorkerDispatcherHost() override;
@@ -168,11 +163,12 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
void OnDecrementServiceWorkerRefCount(int handle_id);
void OnIncrementRegistrationRefCount(int registration_handle_id);
void OnDecrementRegistrationRefCount(int registration_handle_id);
- void OnPostMessageToWorker(int handle_id,
- int provider_id,
- const base::string16& message,
- const url::Origin& source_origin,
- const std::vector<int>& sent_message_ports);
+ void OnPostMessageToWorker(
+ int handle_id,
+ int provider_id,
+ const base::string16& message,
+ const url::Origin& source_origin,
+ const std::vector<MessagePort>& sent_message_ports);
void OnTerminateWorker(int handle_id);
@@ -180,7 +176,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<int>& sent_message_ports,
+ const std::vector<MessagePort>& sent_message_ports,
ServiceWorkerProviderHost* sender_provider_host,
const StatusCallback& callback);
template <typename SourceInfo>
@@ -188,7 +184,7 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<int>& sent_message_ports,
+ const std::vector<MessagePort>& sent_message_ports,
const base::Optional<base::TimeDelta>& timeout,
const StatusCallback& callback,
const SourceInfo& source_info);
@@ -196,13 +192,13 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
scoped_refptr<ServiceWorkerVersion> worker,
const base::string16& message,
const url::Origin& source_origin,
- const std::vector<int>& sent_message_ports,
+ const std::vector<MessagePort>& sent_message_ports,
const ExtendableMessageEventSource& source,
const base::Optional<base::TimeDelta>& timeout,
const StatusCallback& callback);
template <typename SourceInfo>
void DidFailToDispatchExtendableMessageEvent(
- const std::vector<int>& sent_message_ports,
+ const std::vector<MessagePort>& sent_message_ports,
const SourceInfo& source_info,
const StatusCallback& callback,
ServiceWorkerStatusCode status);
@@ -274,7 +270,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcherHost
ServiceWorkerStatusCode status);
const int render_process_id_;
- MessagePortMessageFilter* const message_port_message_filter_;
ResourceContext* resource_context_;
scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_;

Powered by Google App Engine
This is Rietveld 408576698