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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 WebServiceWorkerEventResult result, | 231 WebServiceWorkerEventResult result, |
232 double event_dispatch_time) {} | 232 double event_dispatch_time) {} |
233 | 233 |
234 // ServiceWorker specific method. Called after PaymentRequestEvent (dispatched | 234 // ServiceWorker specific method. Called after PaymentRequestEvent (dispatched |
235 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's script | 235 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's script |
236 // context. | 236 // context. |
237 virtual void DidHandlePaymentRequestEvent(int payment_request_event_id, | 237 virtual void DidHandlePaymentRequestEvent(int payment_request_event_id, |
238 WebServiceWorkerEventResult result, | 238 WebServiceWorkerEventResult result, |
239 double event_dispatch_time) {} | 239 double event_dispatch_time) {} |
240 | 240 |
241 // Ownership of the returned object is transferred to the caller. | |
242 // This is called on the main thread. | 241 // This is called on the main thread. |
243 virtual WebServiceWorkerNetworkProvider* | 242 virtual std::unique_ptr<WebServiceWorkerNetworkProvider> |
244 CreateServiceWorkerNetworkProvider() { | 243 CreateServiceWorkerNetworkProvider() = 0; |
245 return nullptr; | |
246 } | |
247 | 244 |
248 // Creates a WebWorkerFetchContext for a service worker. Ownership of the | 245 // Creates a WebWorkerFetchContext for a service worker. This is called on the |
249 // returned object is transferred to the caller. This is called on the main | 246 // main thread. This is used only when off-main-thread-fetch is enabled. |
250 // thread. This is used only when off-main-thread-fetch is enabled. | |
251 virtual std::unique_ptr<blink::WebWorkerFetchContext> | 247 virtual std::unique_ptr<blink::WebWorkerFetchContext> |
252 CreateServiceWorkerFetchContext() { | 248 CreateServiceWorkerFetchContext() { |
253 return nullptr; | 249 return nullptr; |
254 } | 250 } |
255 | 251 |
256 // Ownership of the returned object is transferred to the caller. | |
257 // This is called on the main thread. | 252 // This is called on the main thread. |
258 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { | 253 virtual std::unique_ptr<WebServiceWorkerProvider> |
259 return nullptr; | 254 CreateServiceWorkerProvider() = 0; |
260 } | |
261 | 255 |
262 // Ownership of the passed callbacks is transferred to the callee, callee | 256 // Ownership of the passed callbacks is transferred to the callee, callee |
263 // should delete the callbacks after calling either onSuccess or onError. | 257 // should delete the callbacks after calling either onSuccess or onError. |
264 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are | 258 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are |
265 // passed to the WebServiceWorkerClientCallbacks implementation. | 259 // passed to the WebServiceWorkerClientCallbacks implementation. |
266 virtual void GetClient(const WebString&, | 260 virtual void GetClient(const WebString&, |
267 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; | 261 std::unique_ptr<WebServiceWorkerClientCallbacks>) = 0; |
268 | 262 |
269 // Ownership of the passed callbacks is transferred to the callee, callee | 263 // Ownership of the passed callbacks is transferred to the callee, callee |
270 // should delete the callbacks after calling either onSuccess or onError. | 264 // should delete the callbacks after calling either onSuccess or onError. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 // Called when the worker wants to register subscopes to handle via foreign | 315 // Called when the worker wants to register subscopes to handle via foreign |
322 // fetch. Will only be called while an install event is in progress. | 316 // fetch. Will only be called while an install event is in progress. |
323 virtual void RegisterForeignFetchScopes( | 317 virtual void RegisterForeignFetchScopes( |
324 const WebVector<WebURL>& sub_scopes, | 318 const WebVector<WebURL>& sub_scopes, |
325 const WebVector<WebSecurityOrigin>& origins) = 0; | 319 const WebVector<WebSecurityOrigin>& origins) = 0; |
326 }; | 320 }; |
327 | 321 |
328 } // namespace blink | 322 } // namespace blink |
329 | 323 |
330 #endif // WebServiceWorkerContextClient_h | 324 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |