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

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

Issue 2490623005: Remove InterfaceRegistry/Provider from service workers (Closed)
Patch Set: rebase/fix comment Created 4 years, 1 month 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/fetch_event_dispatcher.mojom b/content/common/service_worker/service_worker_event_dispatcher.mojom
similarity index 53%
rename from content/common/service_worker/fetch_event_dispatcher.mojom
rename to content/common/service_worker/service_worker_event_dispatcher.mojom
index ff4252f1f6e1a5ebe83928472c00f58c10ea8464..7a17c5ffc97cbe1da16a5c309247a4fa822a6e16 100644
--- a/content/common/service_worker/fetch_event_dispatcher.mojom
+++ b/content/common/service_worker/service_worker_event_dispatcher.mojom
@@ -6,6 +6,7 @@ module content.mojom;
import "content/common/url_loader.mojom";
import "mojo/common/common_custom_types.mojom";
+import "third_party/WebKit/public/platform/modules/background_sync/background_sync.mojom";
import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_event_status.mojom";
[Native]
@@ -16,9 +17,19 @@ struct FetchEventPreloadHandle {
URLLoaderClient& url_loader_client_request;
};
-interface FetchEventDispatcher {
+// Renderer-side interface bound to ServiceWorkerContextClient for dispatching
+// events.
+interface ServiceWorkerEventDispatcher {
+ // |fetch_event_id| is used internally when sending the response back to the
+ // browser process.
DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request,
FetchEventPreloadHandle? preload_handle)
=> (blink.mojom.ServiceWorkerEventStatus status,
mojo.common.mojom.Time dispatch_event_time);
+ // Arguments are passed to the event handler as parameters of SyncEvent.
+ // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event
+ DispatchSyncEvent(string tag,
+ blink.mojom.BackgroundSyncEventLastChance last_chance)
+ => (blink.mojom.ServiceWorkerEventStatus status,
+ mojo.common.mojom.Time dispatch_event_time);
};

Powered by Google App Engine
This is Rietveld 408576698