| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PushRegistration_h |
| 6 #define PushRegistration_h |
| 7 |
| 8 #include "bindings/v8/ScriptWrappable.h" |
| 9 #include "public/platform/WebPushRegistration.h" |
| 10 #include "wtf/text/WTFString.h" |
| 11 |
| 12 namespace WebCore { |
| 13 |
| 14 class PushRegistration FINAL : public RefCounted<PushRegistration>, public Scrip
tWrappable { |
| 15 public: |
| 16 // For CallbackPromiseAdapter. |
| 17 typedef blink::WebPushRegistration WebType; |
| 18 static PassRefPtr<PushRegistration> from(WebType* registration) |
| 19 { |
| 20 return adoptRef(new PushRegistration(registration->endpoint, registratio
n->registrationId, registration->channelName)); |
| 21 } |
| 22 |
| 23 virtual ~PushRegistration(); |
| 24 |
| 25 const String& pushEndpoint() const { return m_pushEndpoint; } |
| 26 const String& pushRegistrationId() const { return m_pushRegistrationId; } |
| 27 const String& channelName() const { return m_channelName; } |
| 28 |
| 29 private: |
| 30 PushRegistration(const String& pushEndpoint, const String& pushRegistrationI
d, const String& channelName); |
| 31 |
| 32 String m_pushEndpoint; |
| 33 String m_pushRegistrationId; |
| 34 String m_channelName; |
| 35 }; |
| 36 |
| 37 } // namespace WebCore |
| 38 |
| 39 #endif // PushRegistration_h |
| OLD | NEW |