Chromium Code Reviews| 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 2f309bb3bd2729fcd745f61b71b0c43a55cd34f3..f622fe91201fd6c2b4c8a917c669c9856ff7f26d 100644 |
| --- a/content/common/service_worker/service_worker_event_dispatcher.mojom |
| +++ b/content/common/service_worker/service_worker_event_dispatcher.mojom |
| @@ -11,6 +11,7 @@ import "mojo/common/time.mojom"; |
| import "third_party/WebKit/public/platform/modules/background_sync/background_sync.mojom"; |
| 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 "third_party/WebKit/public/platform/modules/serviceworker/service_worker_stream_handle.mojom"; |
| import "url/mojo/origin.mojom"; |
| [Native] |
| @@ -50,6 +51,18 @@ struct ExtendableMessageEvent { |
| ExtendableMessageEventSource source; |
| }; |
| +// Browser-side interface which is passed through DispatchFetchEvent. |
| +// The legacy IPC is used when the response body is using blob storage due to |
| +// the IPC's ordering issue. |
|
horo
2017/04/06 05:22:09
Could you please add TODO comment and a link to cr
shimazu
2017/04/07 08:52:29
Done.
|
| +interface ServiceWorkerFetchResponseCallback { |
| + OnResponse(ServiceWorkerResponse response, |
| + mojo.common.mojom.Time dispatch_event_time); |
| + OnResponseStream(ServiceWorkerResponse response, |
| + blink.mojom.ServiceWorkerStreamHandle stream_handle, |
| + mojo.common.mojom.Time dispatch_event_time); |
| + OnFallback(mojo.common.mojom.Time dispatch_event_time); |
| +}; |
| + |
| // Renderer-side interface bound to ServiceWorkerContextClient for dispatching |
| // events. |
| // Those events expecting such response |
| @@ -77,7 +90,8 @@ interface ServiceWorkerEventDispatcher { |
| // |fetch_event_id| is used internally when sending the response back to the |
| // browser process. |
| DispatchFetchEvent(int32 fetch_event_id, blink.mojom.FetchAPIRequest request, |
| - FetchEventPreloadHandle? preload_handle) |
| + FetchEventPreloadHandle? preload_handle, |
| + ServiceWorkerFetchResponseCallback response_callback) |
| => (blink.mojom.ServiceWorkerEventStatus status, |
| mojo.common.mojom.Time dispatch_event_time); |
| DispatchNotificationClickEvent(string notification_id, |