Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebServiceWorkerContextClient_h | 31 #ifndef WebServiceWorkerContextClient_h |
| 32 #define WebServiceWorkerContextClient_h | 32 #define WebServiceWorkerContextClient_h |
| 33 | 33 |
| 34 #include "public/platform/WebMessagePortChannel.h" | 34 #include "public/platform/WebMessagePortChannel.h" |
| 35 #include "public/platform/WebURL.h" | 35 #include "public/platform/WebURL.h" |
| 36 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" | 36 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" |
| 37 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 37 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
| 38 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 38 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerPreloadResponseC allbacks.h" | |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" | 40 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" |
| 40 #include "public/web/WebDevToolsAgentClient.h" | 41 #include "public/web/WebDevToolsAgentClient.h" |
| 41 #include <v8.h> | 42 #include <v8.h> |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 struct WebCrossOriginServiceWorkerClient; | 46 struct WebCrossOriginServiceWorkerClient; |
| 46 struct WebServiceWorkerClientQueryOptions; | 47 struct WebServiceWorkerClientQueryOptions; |
| 47 class WebDataSource; | 48 class WebDataSource; |
| 48 class WebServiceWorkerContextProxy; | 49 class WebServiceWorkerContextProxy; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 WebServiceWorkerEventResult result, | 183 WebServiceWorkerEventResult result, |
| 183 double eventDispatchTime) {} | 184 double eventDispatchTime) {} |
| 184 | 185 |
| 185 // ServiceWorker specific method. Called after SyncEvent (dispatched via | 186 // ServiceWorker specific method. Called after SyncEvent (dispatched via |
| 186 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script | 187 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script |
| 187 // context. | 188 // context. |
| 188 virtual void didHandleSyncEvent(int syncEventID, | 189 virtual void didHandleSyncEvent(int syncEventID, |
| 189 WebServiceWorkerEventResult result, | 190 WebServiceWorkerEventResult result, |
| 190 double eventDispatchTime) {} | 191 double eventDispatchTime) {} |
| 191 | 192 |
| 193 // ServiceWorker specific method. Called after a FetchEvent is created via | |
| 194 // WebServiceWorkerContextProxy::dispatchFetchEvent() with | |
| 195 // navigationPreloadSent flag set to register the preload responce callback. | |
|
falken
2016/10/19 06:00:13
nit: response
horo
2016/10/19 07:11:45
Done.
| |
| 196 virtual void registerPreloadResponseCallback( | |
| 197 int eventID, | |
| 198 WebServiceWorkerPreloadResponseCallbacks*) {} | |
| 199 | |
| 192 // Ownership of the returned object is transferred to the caller. | 200 // Ownership of the returned object is transferred to the caller. |
| 193 // This is called on the main thread. | 201 // This is called on the main thread. |
| 194 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( | 202 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( |
| 195 WebDataSource*) { | 203 WebDataSource*) { |
| 196 return nullptr; | 204 return nullptr; |
| 197 } | 205 } |
| 198 | 206 |
| 199 // Ownership of the returned object is transferred to the caller. | 207 // Ownership of the returned object is transferred to the caller. |
| 200 // This is called on the main thread. | 208 // This is called on the main thread. |
| 201 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { | 209 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 // Called when the worker wants to register subscopes to handle via foreign | 275 // Called when the worker wants to register subscopes to handle via foreign |
| 268 // fetch. Will only be called while an install event is in progress. | 276 // fetch. Will only be called while an install event is in progress. |
| 269 virtual void registerForeignFetchScopes( | 277 virtual void registerForeignFetchScopes( |
| 270 const WebVector<WebURL>& subScopes, | 278 const WebVector<WebURL>& subScopes, |
| 271 const WebVector<WebSecurityOrigin>& origins) = 0; | 279 const WebVector<WebSecurityOrigin>& origins) = 0; |
| 272 }; | 280 }; |
| 273 | 281 |
| 274 } // namespace blink | 282 } // namespace blink |
| 275 | 283 |
| 276 #endif // WebServiceWorkerContextClient_h | 284 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |