| 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/content/payment_app.mojom"; | 7 import "components/payments/content/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/request.mojom"; |
| 12 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"; |
| 13 import "url/mojo/origin.mojom"; | 14 import "url/mojo/origin.mojom"; |
| 14 | 15 |
| 15 [Native] | 16 [Native] |
| 16 struct PlatformNotificationData; | 17 struct PlatformNotificationData; |
| 17 | 18 |
| 18 [Native] | 19 [Native] |
| 19 struct PushEventPayload; | 20 struct PushEventPayload; |
| 20 | 21 |
| 21 [Native] | 22 [Native] |
| 22 struct ServiceWorkerFetchRequest; | |
| 23 | |
| 24 [Native] | |
| 25 struct ServiceWorkerResponse; | 23 struct ServiceWorkerResponse; |
| 26 | 24 |
| 27 [Native] | 25 [Native] |
| 28 struct ExtendableMessageEventSource; | 26 struct ExtendableMessageEventSource; |
| 29 | 27 |
| 30 // TODO(peter): Move this to Blink when both ServiceWorkerFetchRequest and | 28 // TODO(peter): Move this to Blink when ServiceWorkerResponse has a Mojo |
| 31 // ServiceWorkerResponse have Mojo counterparts. | 29 // counterpart. |
| 32 struct BackgroundFetchSettledFetch { | 30 struct BackgroundFetchSettledFetch { |
| 33 ServiceWorkerFetchRequest request; | 31 blink.mojom.FetchAPIRequest request; |
| 34 ServiceWorkerResponse response; | 32 ServiceWorkerResponse response; |
| 35 }; | 33 }; |
| 36 | 34 |
| 37 enum BackgroundFetchState { | 35 enum BackgroundFetchState { |
| 38 PENDING, | 36 PENDING, |
| 39 SUCCEEDED, | 37 SUCCEEDED, |
| 40 FAILED | 38 FAILED |
| 41 }; | 39 }; |
| 42 | 40 |
| 43 struct FetchEventPreloadHandle { | 41 struct FetchEventPreloadHandle { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 67 DispatchBackgroundFetchFailEvent(string tag, | 65 DispatchBackgroundFetchFailEvent(string tag, |
| 68 array<BackgroundFetchSettledFetch> fetches) | 66 array<BackgroundFetchSettledFetch> fetches) |
| 69 => (blink.mojom.ServiceWorkerEventStatus status, | 67 => (blink.mojom.ServiceWorkerEventStatus status, |
| 70 mojo.common.mojom.Time dispatch_event_time); | 68 mojo.common.mojom.Time dispatch_event_time); |
| 71 DispatchBackgroundFetchedEvent(string tag, | 69 DispatchBackgroundFetchedEvent(string tag, |
| 72 array<BackgroundFetchSettledFetch> fetches) | 70 array<BackgroundFetchSettledFetch> fetches) |
| 73 => (blink.mojom.ServiceWorkerEventStatus status, | 71 => (blink.mojom.ServiceWorkerEventStatus status, |
| 74 mojo.common.mojom.Time dispatch_event_time); | 72 mojo.common.mojom.Time dispatch_event_time); |
| 75 // |fetch_event_id| is used internally when sending the response back to the | 73 // |fetch_event_id| is used internally when sending the response back to the |
| 76 // browser process. | 74 // browser process. |
| 77 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, | 75 DispatchFetchEvent(int32 fetch_event_id, blink.mojom.FetchAPIRequest request, |
| 78 FetchEventPreloadHandle? preload_handle) | 76 FetchEventPreloadHandle? preload_handle) |
| 79 => (blink.mojom.ServiceWorkerEventStatus status, | 77 => (blink.mojom.ServiceWorkerEventStatus status, |
| 80 mojo.common.mojom.Time dispatch_event_time); | 78 mojo.common.mojom.Time dispatch_event_time); |
| 81 DispatchNotificationClickEvent(string notification_id, | 79 DispatchNotificationClickEvent(string notification_id, |
| 82 PlatformNotificationData notification_data, | 80 PlatformNotificationData notification_data, |
| 83 int32 action_index, | 81 int32 action_index, |
| 84 mojo.common.mojom.String16? reply) | 82 mojo.common.mojom.String16? reply) |
| 85 => (blink.mojom.ServiceWorkerEventStatus status, | 83 => (blink.mojom.ServiceWorkerEventStatus status, |
| 86 mojo.common.mojom.Time dispatch_event_time); | 84 mojo.common.mojom.Time dispatch_event_time); |
| 87 DispatchNotificationCloseEvent(string notification_id, | 85 DispatchNotificationCloseEvent(string notification_id, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 103 DispatchExtendableMessageEvent(ExtendableMessageEvent event) | 101 DispatchExtendableMessageEvent(ExtendableMessageEvent event) |
| 104 => (blink.mojom.ServiceWorkerEventStatus status, | 102 => (blink.mojom.ServiceWorkerEventStatus status, |
| 105 mojo.common.mojom.Time dispatch_event_time); | 103 mojo.common.mojom.Time dispatch_event_time); |
| 106 | 104 |
| 107 // Pings the service worker to check if it is responsive. If the callback is | 105 // Pings the service worker to check if it is responsive. If the callback is |
| 108 // not called within a certain period of time, the browser will terminate the | 106 // not called within a certain period of time, the browser will terminate the |
| 109 // worker. Unlike the other functions in this interface, Ping() does not | 107 // worker. Unlike the other functions in this interface, Ping() does not |
| 110 // dispatch an event. | 108 // dispatch an event. |
| 111 Ping() => (); | 109 Ping() => (); |
| 112 }; | 110 }; |
| OLD | NEW |