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/SuspendableObject.h" | 10 #include "core/dom/SuspendableObject.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 class ScriptPromise; | 23 class ScriptPromise; |
24 class ScriptState; | 24 class ScriptState; |
25 | 25 |
26 // The implementation of a service worker registration object in Blink. Actual | 26 // The implementation of a service worker registration object in Blink. Actual |
27 // registration representation is in the embedder and this class accesses it | 27 // registration representation is in the embedder and this class accesses it |
28 // via WebServiceWorkerRegistration::Handle object. | 28 // via WebServiceWorkerRegistration::Handle object. |
29 class ServiceWorkerRegistration final | 29 class ServiceWorkerRegistration final |
30 : public EventTargetWithInlineData, | 30 : public EventTargetWithInlineData, |
31 public ActiveScriptWrappable, | 31 public ActiveScriptWrappable<ServiceWorkerRegistration>, |
32 public SuspendableObject, | 32 public SuspendableObject, |
33 public WebServiceWorkerRegistrationProxy, | 33 public WebServiceWorkerRegistrationProxy, |
34 public Supplementable<ServiceWorkerRegistration> { | 34 public Supplementable<ServiceWorkerRegistration> { |
35 DEFINE_WRAPPERTYPEINFO(); | 35 DEFINE_WRAPPERTYPEINFO(); |
36 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); | 36 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistration); |
37 USING_PRE_FINALIZER(ServiceWorkerRegistration, dispose); | 37 USING_PRE_FINALIZER(ServiceWorkerRegistration, dispose); |
38 | 38 |
39 public: | 39 public: |
40 // Called from CallbackPromiseAdapter. | 40 // Called from CallbackPromiseAdapter. |
41 using WebType = std::unique_ptr<WebServiceWorkerRegistration::Handle>; | 41 using WebType = std::unique_ptr<WebServiceWorkerRegistration::Handle>; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 registrations.append( | 119 registrations.append( |
120 ServiceWorkerRegistration::take(resolver, std::move(registration))); | 120 ServiceWorkerRegistration::take(resolver, std::move(registration))); |
121 } | 121 } |
122 return registrations; | 122 return registrations; |
123 } | 123 } |
124 }; | 124 }; |
125 | 125 |
126 } // namespace blink | 126 } // namespace blink |
127 | 127 |
128 #endif // ServiceWorkerRegistration_h | 128 #endif // ServiceWorkerRegistration_h |
OLD | NEW |