| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 PaymentAppServiceWorkerRegistration_h | 5 #ifndef PaymentAppServiceWorkerRegistration_h |
| 6 #define PaymentAppServiceWorkerRegistration_h | 6 #define PaymentAppServiceWorkerRegistration_h |
| 7 | 7 |
| 8 #include "platform/Supplementable.h" | 8 #include "platform/Supplementable.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class PaymentAppManager; | 13 class PaymentAppManager; |
| 14 class ScriptState; |
| 14 class ServiceWorkerRegistration; | 15 class ServiceWorkerRegistration; |
| 15 | 16 |
| 16 class PaymentAppServiceWorkerRegistration final | 17 class PaymentAppServiceWorkerRegistration final |
| 17 : public GarbageCollectedFinalized<PaymentAppServiceWorkerRegistration>, | 18 : public GarbageCollectedFinalized<PaymentAppServiceWorkerRegistration>, |
| 18 public Supplement<ServiceWorkerRegistration> { | 19 public Supplement<ServiceWorkerRegistration> { |
| 19 USING_GARBAGE_COLLECTED_MIXIN(PaymentAppServiceWorkerRegistration); | 20 USING_GARBAGE_COLLECTED_MIXIN(PaymentAppServiceWorkerRegistration); |
| 20 WTF_MAKE_NONCOPYABLE(PaymentAppServiceWorkerRegistration); | 21 WTF_MAKE_NONCOPYABLE(PaymentAppServiceWorkerRegistration); |
| 21 | 22 |
| 22 public: | 23 public: |
| 23 virtual ~PaymentAppServiceWorkerRegistration(); | 24 virtual ~PaymentAppServiceWorkerRegistration(); |
| 24 static PaymentAppServiceWorkerRegistration& from(ServiceWorkerRegistration&); | 25 static PaymentAppServiceWorkerRegistration& from(ServiceWorkerRegistration&); |
| 25 | 26 |
| 26 static PaymentAppManager* paymentAppManager(ServiceWorkerRegistration&); | 27 static PaymentAppManager* paymentAppManager(ScriptState*, |
| 27 PaymentAppManager* paymentAppManager(); | 28 ServiceWorkerRegistration&); |
| 29 PaymentAppManager* paymentAppManager(ScriptState*); |
| 28 | 30 |
| 29 DECLARE_VIRTUAL_TRACE(); | 31 DECLARE_VIRTUAL_TRACE(); |
| 30 | 32 |
| 31 private: | 33 private: |
| 32 explicit PaymentAppServiceWorkerRegistration(ServiceWorkerRegistration*); | 34 explicit PaymentAppServiceWorkerRegistration(ServiceWorkerRegistration*); |
| 33 static const char* supplementName(); | 35 static const char* supplementName(); |
| 34 | 36 |
| 35 Member<ServiceWorkerRegistration> m_registration; | 37 Member<ServiceWorkerRegistration> m_registration; |
| 36 Member<PaymentAppManager> m_paymentAppManager; | 38 Member<PaymentAppManager> m_paymentAppManager; |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 } // namespace blink | 41 } // namespace blink |
| 40 | 42 |
| 41 #endif // PaymentAppServiceWorkerRegistration_h | 43 #endif // PaymentAppServiceWorkerRegistration_h |
| OLD | NEW |