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

Unified Diff: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Addressed comments from kinuko and haraken Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/serviceworker/service_worker_stream_handle.mojom ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
diff --git a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
index 4b8c565edbc49ab90c28183cf91ca6a8bc4c2700..63062cf4cea0399fc338d503ac418b8c4797c14b 100644
--- a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
+++ b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
@@ -39,6 +39,7 @@
#include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallbacks.h"
+#include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h"
#include "public/web/WebDevToolsAgentClient.h"
#include "v8/include/v8.h"
@@ -162,17 +163,28 @@ class WebServiceWorkerContextClient {
WebServiceWorkerEventResult result,
double event_dispatch_time) {}
- // ServiceWorker specific methods. respondFetchEvent will be called after
+ // ServiceWorker specific methods. RespondToFetchEvent* will be called after
// FetchEvent returns a response by the ServiceWorker's script context, and
- // didHandleFetchEvent will be called after the end of FetchEvent's
+ // DidHandleFetchEvent will be called after the end of FetchEvent's
// lifecycle. When no response is provided, the browser should fallback to
- // native fetch. EventIDs are the same with the ids passed from
- // dispatchFetchEvent respectively.
- virtual void RespondToFetchEvent(int fetch_event_id,
- double event_dispatch_time) {}
+ // native fetch. |fetch_event_id|s are the same with the ids passed from
+ // DispatchFetchEvent respectively.
+
+ // Used when respondWith() is not called. Tells the browser to fall back to
+ // native fetch.
+ virtual void RespondToFetchEventWithNoResponse(int fetch_event_id,
+ double event_dispatch_time) {}
+ // Responds to the fetch event with |response|.
virtual void RespondToFetchEvent(int fetch_event_id,
const WebServiceWorkerResponse& response,
double event_dispatch_time) {}
+ // Responds to the fetch event with |response|, where body is
+ // |body_as_stream|.
+ virtual void RespondToFetchEventWithResponseStream(
+ int fetch_event_id,
+ const WebServiceWorkerResponse& response,
+ WebServiceWorkerStreamHandle* body_as_stream,
+ double event_dispatch_time) {}
virtual void RespondToPaymentRequestEvent(
int event_id,
const WebPaymentAppResponse& response,
« no previous file with comments | « third_party/WebKit/public/platform/modules/serviceworker/service_worker_stream_handle.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698