Chromium Code Reviews| Index: content/common/service_worker/embedded_worker.mojom |
| diff --git a/content/common/service_worker/embedded_worker.mojom b/content/common/service_worker/embedded_worker.mojom |
| index ad40ca1de37035fe6be8d1c62e82aedd97c7372d..83883ad157c7a96c9b194cc70ab5d08fa02127c6 100644 |
| --- a/content/common/service_worker/embedded_worker.mojom |
| +++ b/content/common/service_worker/embedded_worker.mojom |
| @@ -5,6 +5,7 @@ |
| module content.mojom; |
| import "content/common/service_worker/service_worker_event_dispatcher.mojom"; |
| +import "mojo/common/string16.mojom"; |
| import "services/service_manager/public/interfaces/interface_provider.mojom"; |
| import "third_party/WebKit/public/web/console_message.mojom"; |
| import "url/mojo/url.mojom"; |
| @@ -15,9 +16,40 @@ struct EmbeddedWorkerStartParams; |
| // Interface to control a renderer-side worker's environment. |
|
falken
2017/04/11 08:29:27
Interface to control a renderer-side embedded work
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done.
|
| interface EmbeddedWorkerInstanceClient { |
| StartWorker(EmbeddedWorkerStartParams params, |
| - ServiceWorkerEventDispatcher& dispatcher_request); |
| - StopWorker() => (); |
| + ServiceWorkerEventDispatcher& dispatcher_request, |
| + associated EmbeddedWorkerInstanceHost instance_host); |
| + // The response is sent back via EmbeddedWorkerInstanceHost.OnStopped(). |
| + StopWorker(); |
| ResumeAfterDownload(); |
| AddMessageToConsole(blink.mojom.ConsoleMessageLevel level, |
| string message); |
| -}; |
| +}; |
| + |
| +// Interface to control a browser-side embedded worker instance, be associated |
| +// with interface EmbeddedWorkerInstanceClient. |
|
falken
2017/04/11 08:29:27
Interface to control a browser-side embedded worke
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done and Thanks!
All mojo interfaces associated t
|
| +interface EmbeddedWorkerInstanceHost { |
| + // Sent on main thread. |
| + // Indicate that the worker is ready for inspection. |
|
falken
2017/04/11 08:29:27
Indicates* here and below.
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done.
|
| + OnReadyForInspection(); |
| + // Indicate that the worker has loaded the script. |
| + OnScriptLoaded(); |
| + // Indicate that the worker has failed to load the script. |
| + OnScriptLoadFailed(); |
| + // Indicate that the worker is stopped. |
| + OnStopped(); |
| + |
| + // Sent on worker thread. |
| + // Indicate that the worker thread is started. |
| + OnThreadStarted(int32 thread_id, int32 provider_id); |
|
falken
2017/04/11 08:29:27
Can you comment what |thread_id| is and |provider_
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done.
But I'm not quite sure whether platform thre
|
| + // Indicate that the worker has evaluated the script. |
|
falken
2017/04/11 08:29:27
Can you comment what |success| is. IIRC it means e
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done and Thanks!
|
| + OnScriptEvaluated(bool success); |
| + // Indicate that the worker is started. |
| + OnStarted(); |
| + // Report an exception. |
|
falken
2017/04/11 08:29:27
Reports*
leonhsl(Using Gerrit)
2017/04/11 09:29:02
Done.
|
| + OnReportException(mojo.common.mojom.String16 error_message, int32 line_number, |
| + int32 column_number, url.mojom.Url source_url); |
| + // Report console message. |
| + OnReportConsoleMessage(int32 source_identifier, int32 message_level, |
| + mojo.common.mojom.String16 message, int32 line_number, |
| + url.mojom.Url source_url); |
| +}; |