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 42d1218c722ed180f477bab8fddc1260c56e745b..83820479ece5784a57b3c886a9cc4b0e9c170ca7 100644 |
--- a/content/common/service_worker/service_worker_event_dispatcher.mojom |
+++ b/content/common/service_worker/service_worker_event_dispatcher.mojom |
@@ -12,6 +12,7 @@ import "third_party/WebKit/public/platform/modules/background_sync/background_sy |
import "third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom"; |
import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_event_status.mojom"; |
import "url/mojo/origin.mojom"; |
+import "url/mojo/url.mojom"; |
[Native] |
struct PlatformNotificationData; |
@@ -57,6 +58,10 @@ struct ExtendableMessageEvent { |
// 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used |
// to create the callback for these. |
interface ServiceWorkerEventDispatcher { |
+ DispatchInstallEvent(associated ServiceWorkerInstallEventMethods method) |
+ => (blink.mojom.ServiceWorkerEventStatus status, |
+ bool has_fetch_handler, |
+ mojo.common.mojom.Time dispatch_event_time); |
DispatchActivateEvent() |
=> (blink.mojom.ServiceWorkerEventStatus status, |
mojo.common.mojom.Time dispatch_event_time); |
@@ -114,3 +119,11 @@ interface ServiceWorkerEventDispatcher { |
// dispatch an event. |
Ping() => (); |
}; |
+ |
+// This interface is passed from the browser to the renderer with |
+// DispatchInstallEvent. The ordering between RegisterForeignFetchScopes and the |
+// callback of DispatchInstallEvent should be preserved. |
+interface ServiceWorkerInstallEventMethods { |
+ RegisterForeignFetchScopes(array<url.mojom.Url> sub_scopes, |
+ array<url.mojom.Origin> origins); |
+}; |