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