| 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 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 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 WebServiceWorkerProvider_h | 31 #ifndef WebServiceWorkerProvider_h |
| 32 #define WebServiceWorkerProvider_h | 32 #define WebServiceWorkerProvider_h |
| 33 | 33 |
| 34 #include "public/platform/WebCallbacks.h" | 34 #include "public/platform/WebCallbacks.h" |
| 35 #include "public/platform/WebVector.h" | 35 #include "public/platform/WebVector.h" |
| 36 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" | 36 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" |
| 37 #include "public/platform/modules/serviceworker/WebServiceWorkerUpdateViaCache.h
" |
| 37 | 38 |
| 38 #include <memory> | 39 #include <memory> |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 class WebURL; | 43 class WebURL; |
| 43 class WebServiceWorkerProviderClient; | 44 class WebServiceWorkerProviderClient; |
| 44 struct WebServiceWorkerError; | 45 struct WebServiceWorkerError; |
| 45 | 46 |
| 46 // Created on the main thread, and may be passed to another script context | 47 // Created on the main thread, and may be passed to another script context |
| (...skipping 16 matching lines...) Expand all Loading... |
| 63 WebVector<std::unique_ptr<WebServiceWorkerRegistration::Handle>>; | 64 WebVector<std::unique_ptr<WebServiceWorkerRegistration::Handle>>; |
| 64 using WebServiceWorkerGetRegistrationsCallbacks = | 65 using WebServiceWorkerGetRegistrationsCallbacks = |
| 65 WebCallbacks<std::unique_ptr<WebServiceWorkerRegistrationHandles>, | 66 WebCallbacks<std::unique_ptr<WebServiceWorkerRegistrationHandles>, |
| 66 const WebServiceWorkerError&>; | 67 const WebServiceWorkerError&>; |
| 67 using WebServiceWorkerGetRegistrationForReadyCallbacks = | 68 using WebServiceWorkerGetRegistrationForReadyCallbacks = |
| 68 WebCallbacks<std::unique_ptr<WebServiceWorkerRegistration::Handle>, void>; | 69 WebCallbacks<std::unique_ptr<WebServiceWorkerRegistration::Handle>, void>; |
| 69 | 70 |
| 70 virtual void RegisterServiceWorker( | 71 virtual void RegisterServiceWorker( |
| 71 const WebURL& pattern, | 72 const WebURL& pattern, |
| 72 const WebURL& script_url, | 73 const WebURL& script_url, |
| 74 blink::WebServiceWorkerUpdateViaCache update_via_cache, |
| 73 std::unique_ptr<WebServiceWorkerRegistrationCallbacks>) {} | 75 std::unique_ptr<WebServiceWorkerRegistrationCallbacks>) {} |
| 74 virtual void GetRegistration( | 76 virtual void GetRegistration( |
| 75 const WebURL& document_url, | 77 const WebURL& document_url, |
| 76 std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks>) {} | 78 std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks>) {} |
| 77 virtual void GetRegistrations( | 79 virtual void GetRegistrations( |
| 78 std::unique_ptr<WebServiceWorkerGetRegistrationsCallbacks>) {} | 80 std::unique_ptr<WebServiceWorkerGetRegistrationsCallbacks>) {} |
| 79 virtual void GetRegistrationForReady( | 81 virtual void GetRegistrationForReady( |
| 80 std::unique_ptr<WebServiceWorkerGetRegistrationForReadyCallbacks>) {} | 82 std::unique_ptr<WebServiceWorkerGetRegistrationForReadyCallbacks>) {} |
| 81 virtual bool ValidateScopeAndScriptURL(const WebURL& scope, | 83 virtual bool ValidateScopeAndScriptURL(const WebURL& scope, |
| 82 const WebURL& script_url, | 84 const WebURL& script_url, |
| 83 WebString* error_message) { | 85 WebString* error_message) { |
| 84 return false; | 86 return false; |
| 85 } | 87 } |
| 86 | 88 |
| 87 virtual ~WebServiceWorkerProvider() {} | 89 virtual ~WebServiceWorkerProvider() {} |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace blink | 92 } // namespace blink |
| 91 | 93 |
| 92 #endif | 94 #endif |
| OLD | NEW |