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

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

Issue 2034663002: ServiceWorker: Keep the worker alive until FetchEvent.waitUntil settles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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: 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 e78f707acd38fd10cde53af3cf4e36d06651c6ea..cf3adabf5dc9e9e12811eea5d7fca6b8b7058b24 100644
--- a/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
+++ b/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
@@ -118,11 +118,15 @@ public:
// script context.
virtual void didHandleExtendableMessageEvent(int eventID, WebServiceWorkerEventResult result) { }
- // ServiceWorker specific methods. Called after FetchEvent is handled by the
- // ServiceWorker's script context. When no response is provided, the browser
- // should fallback to native fetch.
- virtual void didHandleFetchEvent(int fetchEventID) { }
- virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerResponse& response) { }
+ // ServiceWorker specific methods. respondFetchEvent 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
+ // 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 responseID) { };
+ virtual void respondToFetchEvent(int responseID, const WebServiceWorkerResponse& response) { };
+ virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventResult result) { };
// ServiceWorker specific method. Called after InstallEvent (dispatched
// via WebServiceWorkerContextProxy) is handled by the ServiceWorker's

Powered by Google App Engine
This is Rietveld 408576698