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/url_loader.mojom"; | 7 import "content/common/url_loader.mojom"; |
8 import "mojo/common/string16.mojom"; | 8 import "mojo/common/string16.mojom"; |
9 import "mojo/common/time.mojom"; | 9 import "mojo/common/time.mojom"; |
10 import "third_party/WebKit/public/platform/modules/background_sync/background_sy
nc.mojom"; | 10 import "third_party/WebKit/public/platform/modules/background_sync/background_sy
nc.mojom"; |
11 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_
event_status.mojom"; | 11 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_
event_status.mojom"; |
12 import "url/mojo/origin.mojom"; | 12 import "url/mojo/origin.mojom"; |
13 | 13 |
14 [Native] | 14 [Native] |
15 struct ServiceWorkerFetchRequest; | 15 struct ServiceWorkerFetchRequest; |
16 | 16 |
17 [Native] | 17 [Native] |
18 struct ExtendableMessageEventSource; | 18 struct ExtendableMessageEventSource; |
19 | 19 |
20 struct FetchEventPreloadHandle { | 20 struct FetchEventPreloadHandle { |
21 URLLoader url_loader; | 21 URLLoader url_loader; |
22 URLLoaderClient& url_loader_client_request; | 22 URLLoaderClient& url_loader_client_request; |
23 }; | 23 }; |
24 | 24 |
25 struct ExtendableMessageEvent { | 25 struct ExtendableMessageEvent { |
26 mojo.common.mojom.String16 message; | 26 mojo.common.mojom.String16 message; |
27 url.mojom.Origin source_origin; | 27 url.mojom.Origin source_origin; |
28 array<int32> message_ports; | 28 array<handle<message_pipe>> message_ports; |
29 array<int32> new_routing_ids; | |
30 ExtendableMessageEventSource source; | 29 ExtendableMessageEventSource source; |
31 }; | 30 }; |
32 | 31 |
33 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching | 32 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching |
34 // events. | 33 // events. |
35 interface ServiceWorkerEventDispatcher { | 34 interface ServiceWorkerEventDispatcher { |
36 // |fetch_event_id| is used internally when sending the response back to the | 35 // |fetch_event_id| is used internally when sending the response back to the |
37 // browser process. | 36 // browser process. |
38 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, | 37 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, |
39 FetchEventPreloadHandle? preload_handle) | 38 FetchEventPreloadHandle? preload_handle) |
40 => (blink.mojom.ServiceWorkerEventStatus status, | 39 => (blink.mojom.ServiceWorkerEventStatus status, |
41 mojo.common.mojom.Time dispatch_event_time); | 40 mojo.common.mojom.Time dispatch_event_time); |
42 // Arguments are passed to the event handler as parameters of SyncEvent. | 41 // Arguments are passed to the event handler as parameters of SyncEvent. |
43 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event | 42 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event |
44 DispatchSyncEvent(string tag, | 43 DispatchSyncEvent(string tag, |
45 blink.mojom.BackgroundSyncEventLastChance last_chance) | 44 blink.mojom.BackgroundSyncEventLastChance last_chance) |
46 => (blink.mojom.ServiceWorkerEventStatus status, | 45 => (blink.mojom.ServiceWorkerEventStatus status, |
47 mojo.common.mojom.Time dispatch_event_time); | 46 mojo.common.mojom.Time dispatch_event_time); |
48 DispatchExtendableMessageEvent(ExtendableMessageEvent event) | 47 DispatchExtendableMessageEvent(ExtendableMessageEvent event) |
49 => (blink.mojom.ServiceWorkerEventStatus status, | 48 => (blink.mojom.ServiceWorkerEventStatus status, |
50 mojo.common.mojom.Time dispatch_event_time); | 49 mojo.common.mojom.Time dispatch_event_time); |
51 }; | 50 }; |
OLD | NEW |