Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Unified Diff: content/common/service_worker/service_worker_event_dispatcher.mojom

Issue 2767093004: Implement the BackgroundFetch{Fail,ed} Service Worker events (Closed)
Patch Set: forward declare the data view Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698