Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module content.mojom; | 5 module content.mojom; |
| 6 | 6 |
| 7 import "content/common/service_worker/service_worker_event_dispatcher.mojom"; | 7 import "content/common/service_worker/service_worker_event_dispatcher.mojom"; |
| 8 import "mojo/common/string16.mojom"; | |
| 8 import "services/service_manager/public/interfaces/interface_provider.mojom"; | 9 import "services/service_manager/public/interfaces/interface_provider.mojom"; |
| 9 import "third_party/WebKit/public/web/console_message.mojom"; | 10 import "third_party/WebKit/public/web/console_message.mojom"; |
| 10 import "url/mojo/url.mojom"; | 11 import "url/mojo/url.mojom"; |
| 11 | 12 |
| 12 [Native] | 13 [Native] |
| 13 struct EmbeddedWorkerStartParams; | 14 struct EmbeddedWorkerStartParams; |
| 14 | 15 |
| 15 // Interface to control a renderer-side worker's environment. | 16 // Interface to control a renderer-side worker's environment. |
| 16 interface EmbeddedWorkerInstanceClient { | 17 interface EmbeddedWorkerInstanceClient { |
| 17 StartWorker(EmbeddedWorkerStartParams params, | 18 StartWorker(EmbeddedWorkerStartParams params, |
| 18 ServiceWorkerEventDispatcher& dispatcher_request); | 19 ServiceWorkerEventDispatcher& dispatcher_request, |
| 20 associated EmbeddedWorkerInstanceHost instance_host); | |
| 19 StopWorker() => (); | 21 StopWorker() => (); |
|
shimazu
2017/04/06 05:01:36
I think we don't need to have the callback because
leonhsl(Using Gerrit)
2017/04/06 09:58:55
Done.
Yeah I was confused about this.. Thanks for
| |
| 20 ResumeAfterDownload(); | 22 ResumeAfterDownload(); |
| 21 AddMessageToConsole(blink.mojom.ConsoleMessageLevel level, | 23 AddMessageToConsole(blink.mojom.ConsoleMessageLevel level, |
| 22 string message); | 24 string message); |
| 23 }; | 25 }; |
| 26 | |
| 27 // Interface to control a browser-side embedded worker instance, be associated | |
| 28 // with interface EmbeddedWorkerInstanceClient. | |
| 29 interface EmbeddedWorkerInstanceHost { | |
| 30 // Sent on main thread. | |
| 31 // Indicate that the worker is ready for inspection. | |
| 32 OnReadyForInspection(); | |
| 33 // Indicate that the worker has loaded the script. | |
| 34 OnScriptLoaded(); | |
| 35 // Indicate that the worker has failed to load the script. | |
| 36 OnScriptLoadFailed(); | |
| 37 // Indicate that the worker is stopped. | |
| 38 OnStopped(); | |
| 39 | |
| 40 // Sent on worker thread. | |
| 41 // Indicate that the worker thread is started. | |
| 42 OnThreadStarted(int32 thread_id, int32 provider_id); | |
| 43 // Indicate that the worker has evaluated the script. | |
| 44 OnScriptEvaluated(bool success); | |
| 45 // Indicate that the worker is started. | |
| 46 OnStarted(); | |
| 47 // Report an exception. | |
| 48 OnReportException(mojo.common.mojom.String16 error_message, int32 line_number, | |
| 49 int32 column_number, url.mojom.Url source_url); | |
| 50 // Report console message. | |
| 51 OnReportConsoleMessage(int32 source_identifier, int32 message_level, | |
| 52 mojo.common.mojom.String16 message, int32 line_number, | |
| 53 url.mojom.Url source_url); | |
| 54 }; | |
| OLD | NEW |