| 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 PushSubscription_h | 5 #ifndef PushSubscription_h |
| 6 #define PushSubscription_h | 6 #define PushSubscription_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 10 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class PushSubscription final : public GarbageCollectedFinalized<PushSubscription
>, public ScriptWrappable { | 24 class PushSubscription final : public GarbageCollectedFinalized<PushSubscription
>, public ScriptWrappable { |
| 25 DEFINE_WRAPPERTYPEINFO(); | 25 DEFINE_WRAPPERTYPEINFO(); |
| 26 public: | 26 public: |
| 27 static PushSubscription* take(ScriptPromiseResolver*, PassOwnPtr<WebPushSubs
cription>, ServiceWorkerRegistration*); | 27 static PushSubscription* take(ScriptPromiseResolver*, PassOwnPtr<WebPushSubs
cription>, ServiceWorkerRegistration*); |
| 28 static void dispose(WebPushSubscription* subscriptionRaw); | 28 static void dispose(WebPushSubscription* subscriptionRaw); |
| 29 | 29 |
| 30 virtual ~PushSubscription(); | 30 virtual ~PushSubscription(); |
| 31 | 31 |
| 32 KURL endpoint() const; | 32 KURL endpoint() const; |
| 33 | 33 |
| 34 PassRefPtr<DOMArrayBuffer> getKey(const AtomicString& name) const; | 34 DOMArrayBuffer* getKey(const AtomicString& name) const; |
| 35 ScriptPromise unsubscribe(ScriptState*); | 35 ScriptPromise unsubscribe(ScriptState*); |
| 36 | 36 |
| 37 ScriptValue toJSONForBinding(ScriptState*); | 37 ScriptValue toJSONForBinding(ScriptState*); |
| 38 | 38 |
| 39 DECLARE_TRACE(); | 39 DECLARE_TRACE(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 PushSubscription(const WebPushSubscription&, ServiceWorkerRegistration*); | 42 PushSubscription(const WebPushSubscription&, ServiceWorkerRegistration*); |
| 43 | 43 |
| 44 KURL m_endpoint; | 44 KURL m_endpoint; |
| 45 | 45 |
| 46 RefPtr<DOMArrayBuffer> m_p256dh; | 46 Member<DOMArrayBuffer> m_p256dh; |
| 47 RefPtr<DOMArrayBuffer> m_auth; | 47 Member<DOMArrayBuffer> m_auth; |
| 48 | 48 |
| 49 Member<ServiceWorkerRegistration> m_serviceWorkerRegistration; | 49 Member<ServiceWorkerRegistration> m_serviceWorkerRegistration; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace blink | 52 } // namespace blink |
| 53 | 53 |
| 54 #endif // PushSubscription_h | 54 #endif // PushSubscription_h |
| OLD | NEW |