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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Message loop for debugging. 111 // Message loop for debugging.
112 virtual WebDevToolsAgentClient::WebKitClientMessageLoop* createDevToolsMessa geLoop() { return nullptr; } 112 virtual WebDevToolsAgentClient::WebKitClientMessageLoop* createDevToolsMessa geLoop() { return nullptr; }
113 113
114 // ServiceWorker specific method. 114 // ServiceWorker specific method.
115 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult result) { } 115 virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult result) { }
116 116
117 // Called after ExtendableMessageEvent is handled by the ServiceWorker's 117 // Called after ExtendableMessageEvent is handled by the ServiceWorker's
118 // script context. 118 // script context.
119 virtual void didHandleExtendableMessageEvent(int eventID, WebServiceWorkerEv entResult result) { } 119 virtual void didHandleExtendableMessageEvent(int eventID, WebServiceWorkerEv entResult result) { }
120 120
121 // ServiceWorker specific methods. Called after FetchEvent is handled by the 121 // ServiceWorker specific methods. respondFetchEvent will be called after
122 // ServiceWorker's script context. When no response is provided, the browser 122 // FetchEvent returns a response by the ServiceWorker's script context, and
123 // should fallback to native fetch. 123 // didHandleFetchEvent will be called after the end of FetchEvent's
124 virtual void didHandleFetchEvent(int fetchEventID) { } 124 // lifecycle. When no response is provided, the browser should fallback to
125 virtual void didHandleFetchEvent(int fetchEventID, const WebServiceWorkerRes ponse& response) { } 125 // native fetch. EventIDs are the same with the ids passed from
126 // dispatchFetchEvent respectively.
127 virtual void respondToFetchEvent(int responseID) { };
128 virtual void respondToFetchEvent(int responseID, const WebServiceWorkerRespo nse& response) { };
129 virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventRes ult result) { };
126 130
127 // ServiceWorker specific method. Called after InstallEvent (dispatched 131 // ServiceWorker specific method. Called after InstallEvent (dispatched
128 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's 132 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
129 // script context. 133 // script context.
130 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent Result result) { } 134 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent Result result) { }
131 135
132 // ServiceWorker specific method. Called after NotificationClickEvent 136 // ServiceWorker specific method. Called after NotificationClickEvent
133 // (dispatched via WebServiceWorkerContextProxy) is handled by the 137 // (dispatched via WebServiceWorkerContextProxy) is handled by the
134 // ServiceWorker's script context. 138 // ServiceWorker's script context.
135 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv entResult result) { } 139 virtual void didHandleNotificationClickEvent(int eventID, WebServiceWorkerEv entResult result) { }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker ClientCallbacks*) = 0; 212 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker ClientCallbacks*) = 0;
209 213
210 // Called when the worker wants to register subscopes to handle via foreign 214 // Called when the worker wants to register subscopes to handle via foreign
211 // fetch. Will only be called while an install event is in progress. 215 // fetch. Will only be called while an install event is in progress.
212 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const WebVector<WebSecurityOrigin>& origins) = 0; 216 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const WebVector<WebSecurityOrigin>& origins) = 0;
213 }; 217 };
214 218
215 } // namespace blink 219 } // namespace blink
216 220
217 #endif // WebServiceWorkerContextClient_h 221 #endif // WebServiceWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698