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 ServiceWorkerRegistration_h | 5 #ifndef ServiceWorkerRegistration_h |
6 #define ServiceWorkerRegistration_h | 6 #define ServiceWorkerRegistration_h |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static ServiceWorkerRegistration* GetOrCreate( | 63 static ServiceWorkerRegistration* GetOrCreate( |
64 ExecutionContext*, | 64 ExecutionContext*, |
65 std::unique_ptr<WebServiceWorkerRegistration::Handle>); | 65 std::unique_ptr<WebServiceWorkerRegistration::Handle>); |
66 | 66 |
67 ServiceWorker* installing() { return installing_; } | 67 ServiceWorker* installing() { return installing_; } |
68 ServiceWorker* waiting() { return waiting_; } | 68 ServiceWorker* waiting() { return waiting_; } |
69 ServiceWorker* active() { return active_; } | 69 ServiceWorker* active() { return active_; } |
70 NavigationPreloadManager* navigationPreload(); | 70 NavigationPreloadManager* navigationPreload(); |
71 | 71 |
72 String scope() const; | 72 String scope() const; |
| 73 String updateViaCache() const; |
73 | 74 |
74 WebServiceWorkerRegistration* WebRegistration() { | 75 WebServiceWorkerRegistration* WebRegistration() { |
75 return handle_->Registration(); | 76 return handle_->Registration(); |
76 } | 77 } |
77 | 78 |
78 ScriptPromise update(ScriptState*); | 79 ScriptPromise update(ScriptState*); |
79 ScriptPromise unregister(ScriptState*); | 80 ScriptPromise unregister(ScriptState*); |
80 | 81 |
81 DEFINE_ATTRIBUTE_EVENT_LISTENER(updatefound); | 82 DEFINE_ATTRIBUTE_EVENT_LISTENER(updatefound); |
82 | 83 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 registrations.push_back( | 120 registrations.push_back( |
120 ServiceWorkerRegistration::Take(resolver, std::move(registration))); | 121 ServiceWorkerRegistration::Take(resolver, std::move(registration))); |
121 } | 122 } |
122 return registrations; | 123 return registrations; |
123 } | 124 } |
124 }; | 125 }; |
125 | 126 |
126 } // namespace blink | 127 } // namespace blink |
127 | 128 |
128 #endif // ServiceWorkerRegistration_h | 129 #endif // ServiceWorkerRegistration_h |
OLD | NEW |