Index: content/browser/service_worker/embedded_worker_instance.h |
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h |
index 116456b4528ccafdd3f830da61a1b9cce0df1b2f..3e0f83feddf192e07fb2eae5998489a61957a03c 100644 |
--- a/content/browser/service_worker/embedded_worker_instance.h |
+++ b/content/browser/service_worker/embedded_worker_instance.h |
@@ -23,6 +23,7 @@ |
#include "content/browser/service_worker/embedded_worker_status.h" |
#include "content/browser/service_worker/service_worker_metrics.h" |
#include "content/common/content_export.h" |
+#include "content/common/service_worker/embedded_worker.mojom.h" |
#include "content/common/service_worker/service_worker_status_code.h" |
#include "content/public/common/console_message_level.h" |
#include "url/gurl.h" |
@@ -32,8 +33,6 @@ |
#undef SendMessage |
#endif |
-struct EmbeddedWorkerMsg_StartWorker_Params; |
- |
namespace IPC { |
class Message; |
} |
@@ -46,6 +45,7 @@ |
namespace content { |
class EmbeddedWorkerRegistry; |
+struct EmbeddedWorkerStartParams; |
class MessagePortMessageFilter; |
class ServiceWorkerContextCore; |
@@ -111,7 +111,7 @@ |
// started and evaluated, or when an error occurs. |
// |params| should be populated with service worker version info needed |
// to start the worker. |
- void Start(std::unique_ptr<EmbeddedWorkerMsg_StartWorker_Params> params, |
+ void Start(std::unique_ptr<EmbeddedWorkerStartParams> params, |
const StatusCallback& callback); |
// Stops the worker. It is invalid to call this when the worker is |
@@ -223,6 +223,9 @@ |
int worker_devtools_agent_route_id, |
bool wait_for_debugger); |
+ // Sends StartWorker message via Mojo. |
+ void SendMojoStartWorker(std::unique_ptr<EmbeddedWorkerStartParams> params); |
+ |
// Called back from StartTask after a start worker message is sent. |
void OnStartWorkerMessageSent(); |
@@ -305,8 +308,12 @@ |
// Current running information. |
std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_; |
int thread_id_; |
+ |
+ // These are connected to the renderer process after OnThreadStarted. |
std::unique_ptr<shell::InterfaceRegistry> interface_registry_; |
std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; |
+ // |client_| is used to send messages to the renderer process. |
+ mojom::EmbeddedWorkerInstanceClientPtr client_; |
// Whether devtools is attached or not. |
bool devtools_attached_; |