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 "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "core/dom/ActiveDOMObject.h" | 10 #include "core/dom/ActiveDOMObject.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 DECLARE_VIRTUAL_TRACE(); | 78 DECLARE_VIRTUAL_TRACE(); |
79 | 79 |
80 private: | 80 private: |
81 ServiceWorkerRegistration( | 81 ServiceWorkerRegistration( |
82 ExecutionContext*, | 82 ExecutionContext*, |
83 std::unique_ptr<WebServiceWorkerRegistration::Handle>); | 83 std::unique_ptr<WebServiceWorkerRegistration::Handle>); |
84 void dispose(); | 84 void dispose(); |
85 | 85 |
86 // ActiveDOMObject overrides. | 86 // ActiveDOMObject overrides. |
87 void stop() override; | 87 void contextDestroyed() override; |
88 | 88 |
89 // A handle to the registration representation in the embedder. | 89 // A handle to the registration representation in the embedder. |
90 std::unique_ptr<WebServiceWorkerRegistration::Handle> m_handle; | 90 std::unique_ptr<WebServiceWorkerRegistration::Handle> m_handle; |
91 | 91 |
92 Member<ServiceWorker> m_installing; | 92 Member<ServiceWorker> m_installing; |
93 Member<ServiceWorker> m_waiting; | 93 Member<ServiceWorker> m_waiting; |
94 Member<ServiceWorker> m_active; | 94 Member<ServiceWorker> m_active; |
95 | 95 |
96 bool m_stopped; | 96 bool m_stopped; |
97 }; | 97 }; |
(...skipping 10 matching lines...) Expand all Loading... |
108 for (auto& registration : *webServiceWorkerRegistrations) | 108 for (auto& registration : *webServiceWorkerRegistrations) |
109 registrations.append(ServiceWorkerRegistration::getOrCreate( | 109 registrations.append(ServiceWorkerRegistration::getOrCreate( |
110 resolver->getExecutionContext(), std::move(registration))); | 110 resolver->getExecutionContext(), std::move(registration))); |
111 return registrations; | 111 return registrations; |
112 } | 112 } |
113 }; | 113 }; |
114 | 114 |
115 } // namespace blink | 115 } // namespace blink |
116 | 116 |
117 #endif // ServiceWorkerRegistration_h | 117 #endif // ServiceWorkerRegistration_h |
OLD | NEW |