| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 int eventID, | 136 int eventID, |
| 137 WebServiceWorkerEventResult result, | 137 WebServiceWorkerEventResult result, |
| 138 double eventDispatchTime) {} | 138 double eventDispatchTime) {} |
| 139 | 139 |
| 140 // ServiceWorker specific methods. respondFetchEvent will be called after | 140 // ServiceWorker specific methods. respondFetchEvent will be called after |
| 141 // FetchEvent returns a response by the ServiceWorker's script context, and | 141 // FetchEvent returns a response by the ServiceWorker's script context, and |
| 142 // didHandleFetchEvent will be called after the end of FetchEvent's | 142 // didHandleFetchEvent will be called after the end of FetchEvent's |
| 143 // lifecycle. When no response is provided, the browser should fallback to | 143 // lifecycle. When no response is provided, the browser should fallback to |
| 144 // native fetch. EventIDs are the same with the ids passed from | 144 // native fetch. EventIDs are the same with the ids passed from |
| 145 // dispatchFetchEvent respectively. | 145 // dispatchFetchEvent respectively. |
| 146 virtual void respondToFetchEvent(int responseID, double eventDispatchTime) {} | 146 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { |
| 147 virtual void respondToFetchEvent(int responseID, | 147 } |
| 148 virtual void respondToFetchEvent(int fetchEventID, |
| 148 const WebServiceWorkerResponse& response, | 149 const WebServiceWorkerResponse& response, |
| 149 double eventDispatchTime) {} | 150 double eventDispatchTime) {} |
| 150 virtual void didHandleFetchEvent(int eventFinishID, | 151 virtual void didHandleFetchEvent(int fetchEventID, |
| 151 WebServiceWorkerEventResult result, | 152 WebServiceWorkerEventResult result, |
| 152 double eventDispatchTime) {} | 153 double eventDispatchTime) {} |
| 153 | 154 |
| 154 // ServiceWorker specific method. Called after InstallEvent (dispatched | 155 // ServiceWorker specific method. Called after InstallEvent (dispatched |
| 155 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 156 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
| 156 // script context. | 157 // script context. |
| 157 virtual void didHandleInstallEvent(int installEventID, | 158 virtual void didHandleInstallEvent(int installEventID, |
| 158 WebServiceWorkerEventResult result, | 159 WebServiceWorkerEventResult result, |
| 159 double eventDispatchTime) {} | 160 double eventDispatchTime) {} |
| 160 | 161 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // Called when the worker wants to register subscopes to handle via foreign | 267 // Called when the worker wants to register subscopes to handle via foreign |
| 267 // fetch. Will only be called while an install event is in progress. | 268 // fetch. Will only be called while an install event is in progress. |
| 268 virtual void registerForeignFetchScopes( | 269 virtual void registerForeignFetchScopes( |
| 269 const WebVector<WebURL>& subScopes, | 270 const WebVector<WebURL>& subScopes, |
| 270 const WebVector<WebSecurityOrigin>& origins) = 0; | 271 const WebVector<WebSecurityOrigin>& origins) = 0; |
| 271 }; | 272 }; |
| 272 | 273 |
| 273 } // namespace blink | 274 } // namespace blink |
| 274 | 275 |
| 275 #endif // WebServiceWorkerContextClient_h | 276 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |