OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebServiceWorkerRegistration_h | 5 #ifndef WebServiceWorkerRegistration_h |
6 #define WebServiceWorkerRegistration_h | 6 #define WebServiceWorkerRegistration_h |
7 | 7 |
8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
9 #include "public/platform/WebURL.h" | 9 #include "public/platform/WebURL.h" |
10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" | 10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" |
| 11 #include <memory> |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 class WebServiceWorkerProvider; | 15 class WebServiceWorkerProvider; |
15 class WebServiceWorkerRegistrationProxy; | 16 class WebServiceWorkerRegistrationProxy; |
16 struct WebNavigationPreloadState; | 17 struct WebNavigationPreloadState; |
17 | 18 |
18 // The interface of the registration representation in the embedder. The | 19 // The interface of the registration representation in the embedder. The |
19 // embedder implements this interface and passes its handle | 20 // embedder implements this interface and passes its handle |
20 // (WebServiceWorkerRegistration::Handle) to Blink. Blink accesses the | 21 // (WebServiceWorkerRegistration::Handle) to Blink. Blink accesses the |
(...skipping 24 matching lines...) Expand all Loading... |
45 virtual WebServiceWorkerRegistration* registration() { return nullptr; } | 46 virtual WebServiceWorkerRegistration* registration() { return nullptr; } |
46 }; | 47 }; |
47 | 48 |
48 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {} | 49 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {} |
49 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; } | 50 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; } |
50 virtual void proxyStopped() {} | 51 virtual void proxyStopped() {} |
51 | 52 |
52 virtual WebURL scope() const { return WebURL(); } | 53 virtual WebURL scope() const { return WebURL(); } |
53 virtual int64_t registrationId() const = 0; | 54 virtual int64_t registrationId() const = 0; |
54 virtual void update(WebServiceWorkerProvider*, | 55 virtual void update(WebServiceWorkerProvider*, |
55 WebServiceWorkerUpdateCallbacks*) {} | 56 std::unique_ptr<WebServiceWorkerUpdateCallbacks>) {} |
56 virtual void unregister(WebServiceWorkerProvider*, | 57 virtual void unregister( |
57 WebServiceWorkerUnregistrationCallbacks*) {} | 58 WebServiceWorkerProvider*, |
| 59 std::unique_ptr<WebServiceWorkerUnregistrationCallbacks>) {} |
58 | 60 |
59 virtual void enableNavigationPreload( | 61 virtual void enableNavigationPreload( |
60 bool enable, | 62 bool enable, |
61 WebServiceWorkerProvider*, | 63 WebServiceWorkerProvider*, |
62 std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {} | 64 std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {} |
63 virtual void getNavigationPreloadState( | 65 virtual void getNavigationPreloadState( |
64 WebServiceWorkerProvider*, | 66 WebServiceWorkerProvider*, |
65 std::unique_ptr<WebGetNavigationPreloadStateCallbacks>) {} | 67 std::unique_ptr<WebGetNavigationPreloadStateCallbacks>) {} |
66 virtual void setNavigationPreloadHeader( | 68 virtual void setNavigationPreloadHeader( |
67 const WebString& value, | 69 const WebString& value, |
68 WebServiceWorkerProvider*, | 70 WebServiceWorkerProvider*, |
69 std::unique_ptr<WebSetNavigationPreloadHeaderCallbacks>) {} | 71 std::unique_ptr<WebSetNavigationPreloadHeaderCallbacks>) {} |
70 }; | 72 }; |
71 | 73 |
72 } // namespace blink | 74 } // namespace blink |
73 | 75 |
74 #endif // WebServiceWorkerRegistration_h | 76 #endif // WebServiceWorkerRegistration_h |
OLD | NEW |