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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebServiceWorkerContextClient_h | 31 #ifndef WebServiceWorkerContextClient_h |
32 #define WebServiceWorkerContextClient_h | 32 #define WebServiceWorkerContextClient_h |
33 | 33 |
34 #include <memory> | 34 #include <memory> |
35 | 35 |
36 #include "public/platform/WebMessagePortChannel.h" | 36 #include "public/platform/WebMessagePortChannel.h" |
37 #include "public/platform/WebURL.h" | 37 #include "public/platform/WebURL.h" |
| 38 #include "public/platform/WebWorkerFetchContext.h" |
38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" |
39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 40 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 41 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" | 42 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" |
42 #include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h" | 43 #include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h" |
43 #include "public/web/WebDevToolsAgentClient.h" | 44 #include "public/web/WebDevToolsAgentClient.h" |
44 #include "v8/include/v8.h" | 45 #include "v8/include/v8.h" |
45 | 46 |
46 namespace blink { | 47 namespace blink { |
47 | 48 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 WebServiceWorkerEventResult result, | 238 WebServiceWorkerEventResult result, |
238 double event_dispatch_time) {} | 239 double event_dispatch_time) {} |
239 | 240 |
240 // Ownership of the returned object is transferred to the caller. | 241 // Ownership of the returned object is transferred to the caller. |
241 // This is called on the main thread. | 242 // This is called on the main thread. |
242 virtual WebServiceWorkerNetworkProvider* | 243 virtual WebServiceWorkerNetworkProvider* |
243 CreateServiceWorkerNetworkProvider() { | 244 CreateServiceWorkerNetworkProvider() { |
244 return nullptr; | 245 return nullptr; |
245 } | 246 } |
246 | 247 |
| 248 // Creates a WebWorkerFetchContext for a service worker. Ownership of the |
| 249 // returned object is transferred to the caller. This is called on the main |
| 250 // thread. This is used only when off-main-thread-fetch is enabled. |
| 251 virtual std::unique_ptr<blink::WebWorkerFetchContext> |
| 252 CreateServiceWorkerFetchContext() { |
| 253 return nullptr; |
| 254 } |
| 255 |
247 // Ownership of the returned object is transferred to the caller. | 256 // Ownership of the returned object is transferred to the caller. |
248 // This is called on the main thread. | 257 // This is called on the main thread. |
249 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { | 258 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { |
250 return nullptr; | 259 return nullptr; |
251 } | 260 } |
252 | 261 |
253 // Ownership of the passed callbacks is transferred to the callee, callee | 262 // Ownership of the passed callbacks is transferred to the callee, callee |
254 // should delete the callbacks after calling either onSuccess or onError. | 263 // should delete the callbacks after calling either onSuccess or onError. |
255 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are | 264 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are |
256 // passed to the WebServiceWorkerClientCallbacks implementation. | 265 // passed to the WebServiceWorkerClientCallbacks implementation. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // Called when the worker wants to register subscopes to handle via foreign | 321 // Called when the worker wants to register subscopes to handle via foreign |
313 // fetch. Will only be called while an install event is in progress. | 322 // fetch. Will only be called while an install event is in progress. |
314 virtual void RegisterForeignFetchScopes( | 323 virtual void RegisterForeignFetchScopes( |
315 const WebVector<WebURL>& sub_scopes, | 324 const WebVector<WebURL>& sub_scopes, |
316 const WebVector<WebSecurityOrigin>& origins) = 0; | 325 const WebVector<WebSecurityOrigin>& origins) = 0; |
317 }; | 326 }; |
318 | 327 |
319 } // namespace blink | 328 } // namespace blink |
320 | 329 |
321 #endif // WebServiceWorkerContextClient_h | 330 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |