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

Side by Side Diff: content/common/shared_worker.mojom

Issue 2600113003: (SUSPENDED) SharedWorker: Mojofy Renderer(Document)->Browser communication for SharedWorker
Patch Set: address review comments Created 3 years, 11 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module content.mojom;
6
7 import "mojo/common/string16.mojom";
8 import "url/mojo/url.mojom";
9
10 [Native]
11 enum WebContentSecurityPolicyType;
12
13 [Native]
14 enum WebSharedWorkerCreationContextType;
15
16 [Native]
17 enum WebAddressSpace;
18
19 [Native]
20 enum WebWorkerCreationError;
21
22 struct SharedWorkerCreateParams {
23 // URL for the worker script.
24 url.mojom.Url url;
25
26 // Name for a SharedWorker, otherwise empty string.
27 mojo.common.mojom.String16 name;
28
29 // Security policy used in the worker.
30 mojo.common.mojom.String16 content_security_policy;
31
32 // Security policy type used in the worker.
33 WebContentSecurityPolicyType security_policy_type;
34
35 // The ID of the parent document (unique within parent renderer).
36 uint64 document_id;
37
38 // RenderFrame routing id used to send messages back to the parent.
39 int32 render_frame_route_id;
40
41 // Address space of the context that created the worker.
42 WebAddressSpace creation_address_space;
43
44 // The type (secure or nonsecure) of the context that created the worker.
45 WebSharedWorkerCreationContextType creation_context_type;
46 };
47
48 // Per-process browser-side interface bound to SharedWorkerMessageFilter.
49 // Each InterfacePtrs on the same render process will be bound to the same
kinuko 2017/01/11 06:06:43 nit: Each InterfacePtrs -> Each InterfacePtr or Al
50 // SharedWorkerMessageFilter.
51 interface SharedWorkerMessageFilter {
52 // A renderer calls this to the browser process when it wants to create a
53 // worker. The browser will create the worker process if necessary, and
54 // will return the route id.
55 // TODO(nhiroki): This route id will be removed when
56 // browser->renderer(document) communication is mojofied.
57 // (https://crbug.com/612308)
58 // TODO(nhiroki): Make this asynchronous (https://crbug.com/679654).
kinuko 2017/01/11 06:06:43 I feel we could do the necessary refactoring to ma
nhiroki 2017/01/11 07:48:56 Hmmm... I tried this and was stuck. How do we noti
kinuko 2017/01/11 11:51:46 I have imagined that we do necessary refactoring f
nhiroki 2017/01/12 04:05:27 Ah, I understand what you mean. You mean the follo
59 [Sync]
60 OnCreateWorker(SharedWorkerCreateParams params)
61 => (int32 route_id, WebWorkerCreationError error);
62
63 // A renderer calls this to the browser process when a document has been
64 // detached. The browser will use this to constrain the lifecycle of the
65 // renderer process where the associated worker runs (SharedWorkers are shut
66 // down when their last associated document is detached).
67 OnDocumentDetached(uint64 document_id);
68
69 // A renderer sends this to the browser process when it wants to connect to
70 // the worker that is specified by the route id.
71 OnConnectToWorker(int32 route_id, int32 sent_message_port_id);
72 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698