OLD | NEW |
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. respondFetchEvent will be called after | 121 // ServiceWorker specific methods. respondFetchEvent will be called after |
122 // FetchEvent returns a response by the ServiceWorker's script context, and | 122 // FetchEvent returns a response by the ServiceWorker's script context, and |
123 // didHandleFetchEvent will be called after the end of FetchEvent's | 123 // didHandleFetchEvent will be called after the end of FetchEvent's |
124 // lifecycle. When no response is provided, the browser should fallback to | 124 // lifecycle. When no response is provided, the browser should fallback to |
125 // native fetch. EventIDs are the same with the ids passed from | 125 // native fetch. EventIDs are the same with the ids passed from |
126 // dispatchFetchEvent respectively. | 126 // dispatchFetchEvent respectively. |
127 virtual void respondToFetchEvent(int responseID) { }; | 127 virtual void respondToFetchEvent(int responseID, double eventDispatchTime) {
}; |
128 virtual void respondToFetchEvent(int responseID, const WebServiceWorkerRespo
nse& response) { }; | 128 virtual void respondToFetchEvent(int responseID, const WebServiceWorkerRespo
nse& response, double eventDispatchTime) { }; |
129 virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventRes
ult result) { }; | 129 virtual void didHandleFetchEvent(int eventFinishID, WebServiceWorkerEventRes
ult result) { }; |
130 | 130 |
131 // ServiceWorker specific method. Called after InstallEvent (dispatched | 131 // ServiceWorker specific method. Called after InstallEvent (dispatched |
132 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 132 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
133 // script context. | 133 // script context. |
134 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result result) { } | 134 virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEvent
Result result) { } |
135 | 135 |
136 // ServiceWorker specific method. Called after NotificationClickEvent | 136 // ServiceWorker specific method. Called after NotificationClickEvent |
137 // (dispatched via WebServiceWorkerContextProxy) is handled by the | 137 // (dispatched via WebServiceWorkerContextProxy) is handled by the |
138 // ServiceWorker's script context. | 138 // ServiceWorker's script context. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker
ClientCallbacks*) = 0; | 212 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker
ClientCallbacks*) = 0; |
213 | 213 |
214 // 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 |
215 // 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. |
216 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; |
217 }; | 217 }; |
218 | 218 |
219 } // namespace blink | 219 } // namespace blink |
220 | 220 |
221 #endif // WebServiceWorkerContextClient_h | 221 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |