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/mojom/payment_app.mojom"; | 7 import "components/payments/mojom/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/fetch/fetch_api_request.mojom
"; | 12 import "third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom
"; |
13 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_
event_status.mojom"; | 13 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_
event_status.mojom"; |
14 import "url/mojo/origin.mojom"; | 14 import "url/mojo/origin.mojom"; |
| 15 import "url/mojo/url.mojom"; |
15 | 16 |
16 [Native] | 17 [Native] |
17 struct PlatformNotificationData; | 18 struct PlatformNotificationData; |
18 | 19 |
19 [Native] | 20 [Native] |
20 struct PushEventPayload; | 21 struct PushEventPayload; |
21 | 22 |
22 [Native] | 23 [Native] |
23 struct ServiceWorkerResponse; | 24 struct ServiceWorkerResponse; |
24 | 25 |
(...skipping 25 matching lines...) Expand all Loading... |
50 ExtendableMessageEventSource source; | 51 ExtendableMessageEventSource source; |
51 }; | 52 }; |
52 | 53 |
53 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching | 54 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching |
54 // events. | 55 // events. |
55 // Those events expecting such response | 56 // Those events expecting such response |
56 // (blink.mojom.ServiceWorkerEventStatus, mojo.common.mojom.Time) are considered | 57 // (blink.mojom.ServiceWorkerEventStatus, mojo.common.mojom.Time) are considered |
57 // 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used | 58 // 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used |
58 // to create the callback for these. | 59 // to create the callback for these. |
59 interface ServiceWorkerEventDispatcher { | 60 interface ServiceWorkerEventDispatcher { |
| 61 DispatchInstallEvent(associated ServiceWorkerInstallEventMethods method) |
| 62 => (blink.mojom.ServiceWorkerEventStatus status, |
| 63 bool has_fetch_handler, |
| 64 mojo.common.mojom.Time dispatch_event_time); |
60 DispatchActivateEvent() | 65 DispatchActivateEvent() |
61 => (blink.mojom.ServiceWorkerEventStatus status, | 66 => (blink.mojom.ServiceWorkerEventStatus status, |
62 mojo.common.mojom.Time dispatch_event_time); | 67 mojo.common.mojom.Time dispatch_event_time); |
63 DispatchBackgroundFetchAbortEvent(string tag) | 68 DispatchBackgroundFetchAbortEvent(string tag) |
64 => (blink.mojom.ServiceWorkerEventStatus status, | 69 => (blink.mojom.ServiceWorkerEventStatus status, |
65 mojo.common.mojom.Time dispatch_event_time); | 70 mojo.common.mojom.Time dispatch_event_time); |
66 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) | 71 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) |
67 => (blink.mojom.ServiceWorkerEventStatus status, | 72 => (blink.mojom.ServiceWorkerEventStatus status, |
68 mojo.common.mojom.Time dispatch_event_time); | 73 mojo.common.mojom.Time dispatch_event_time); |
69 DispatchBackgroundFetchFailEvent(string tag, | 74 DispatchBackgroundFetchFailEvent(string tag, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 DispatchExtendableMessageEvent(ExtendableMessageEvent event) | 112 DispatchExtendableMessageEvent(ExtendableMessageEvent event) |
108 => (blink.mojom.ServiceWorkerEventStatus status, | 113 => (blink.mojom.ServiceWorkerEventStatus status, |
109 mojo.common.mojom.Time dispatch_event_time); | 114 mojo.common.mojom.Time dispatch_event_time); |
110 | 115 |
111 // Pings the service worker to check if it is responsive. If the callback is | 116 // Pings the service worker to check if it is responsive. If the callback is |
112 // not called within a certain period of time, the browser will terminate the | 117 // not called within a certain period of time, the browser will terminate the |
113 // worker. Unlike the other functions in this interface, Ping() does not | 118 // worker. Unlike the other functions in this interface, Ping() does not |
114 // dispatch an event. | 119 // dispatch an event. |
115 Ping() => (); | 120 Ping() => (); |
116 }; | 121 }; |
| 122 |
| 123 // This interface is passed from the browser to the renderer with |
| 124 // DispatchInstallEvent. The ordering between RegisterForeignFetchScopes and the |
| 125 // callback of DispatchInstallEvent should be preserved. |
| 126 interface ServiceWorkerInstallEventMethods { |
| 127 RegisterForeignFetchScopes(array<url.mojom.Url> sub_scopes, |
| 128 array<url.mojom.Origin> origins); |
| 129 }; |
OLD | NEW |