Index: content/common/service_worker/service_worker_event_dispatcher.mojom |
diff --git a/content/common/service_worker/service_worker_event_dispatcher.mojom b/content/common/service_worker/service_worker_event_dispatcher.mojom |
index 7172f0f77dc997ca31d6224f98ddfecb6e57794b..5aa62f8717af990ae2739ed397db40dc051f9149 100644 |
--- a/content/common/service_worker/service_worker_event_dispatcher.mojom |
+++ b/content/common/service_worker/service_worker_event_dispatcher.mojom |
@@ -22,8 +22,18 @@ struct PushEventPayload; |
struct ServiceWorkerFetchRequest; |
[Native] |
+struct ServiceWorkerResponse; |
+ |
+[Native] |
struct ExtendableMessageEventSource; |
+// TODO(peter): Move this to Blink when both ServiceWorkerFetchRequest and |
+// ServiceWorkerResponse have Mojo counterparts. |
+struct BackgroundFetchSettledFetch { |
+ ServiceWorkerFetchRequest request; |
+ ServiceWorkerResponse response; |
+}; |
+ |
enum BackgroundFetchState { |
PENDING, |
SUCCEEDED, |
@@ -54,6 +64,14 @@ interface ServiceWorkerEventDispatcher { |
DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) |
=> (blink.mojom.ServiceWorkerEventStatus status, |
mojo.common.mojom.Time dispatch_event_time); |
+ DispatchBackgroundFetchFailEvent(string tag, |
+ array<BackgroundFetchSettledFetch> fetches) |
+ => (blink.mojom.ServiceWorkerEventStatus status, |
+ mojo.common.mojom.Time dispatch_event_time); |
+ DispatchBackgroundFetchedEvent(string tag, |
+ array<BackgroundFetchSettledFetch> fetches) |
+ => (blink.mojom.ServiceWorkerEventStatus status, |
+ mojo.common.mojom.Time dispatch_event_time); |
// |fetch_event_id| is used internally when sending the response back to the |
// browser process. |
DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, |