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

Side by Side Diff: content/common/service_worker/embedded_worker.mojom

Issue 2787883003: [ServiceWorker] Add EmbeddedWorkerInstanceHost Interface. (Closed)
Patch Set: Address comments from shimazu@ Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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.
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.
16 interface EmbeddedWorkerInstanceClient { 17 interface EmbeddedWorkerInstanceClient {
17 StartWorker(EmbeddedWorkerStartParams params, 18 StartWorker(EmbeddedWorkerStartParams params,
18 ServiceWorkerEventDispatcher& dispatcher_request); 19 ServiceWorkerEventDispatcher& dispatcher_request,
19 StopWorker() => (); 20 associated EmbeddedWorkerInstanceHost instance_host);
21 // The response is sent back via EmbeddedWorkerInstanceHost.OnStopped().
22 StopWorker();
20 ResumeAfterDownload(); 23 ResumeAfterDownload();
21 AddMessageToConsole(blink.mojom.ConsoleMessageLevel level, 24 AddMessageToConsole(blink.mojom.ConsoleMessageLevel level,
22 string message); 25 string message);
23 }; 26 };
27
28 // Interface to control a browser-side embedded worker instance, be associated
29 // 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
30 interface EmbeddedWorkerInstanceHost {
31 // Sent on main thread.
32 // 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.
33 OnReadyForInspection();
34 // Indicate that the worker has loaded the script.
35 OnScriptLoaded();
36 // Indicate that the worker has failed to load the script.
37 OnScriptLoadFailed();
38 // Indicate that the worker is stopped.
39 OnStopped();
40
41 // Sent on worker thread.
42 // Indicate that the worker thread is started.
43 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
44 // 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!
45 OnScriptEvaluated(bool success);
46 // Indicate that the worker is started.
47 OnStarted();
48 // Report an exception.
falken 2017/04/11 08:29:27 Reports*
leonhsl(Using Gerrit) 2017/04/11 09:29:02 Done.
49 OnReportException(mojo.common.mojom.String16 error_message, int32 line_number,
50 int32 column_number, url.mojom.Url source_url);
51 // Report console message.
52 OnReportConsoleMessage(int32 source_identifier, int32 message_level,
53 mojo.common.mojom.String16 message, int32 line_number,
54 url.mojom.Url source_url);
55 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698