| Index: Source/modules/pushmessaging/PushRegistration.h
|
| diff --git a/Source/modules/pushmessaging/PushRegistration.h b/Source/modules/pushmessaging/PushRegistration.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd1980cd7d8a19623f519f7b0a5f311773ba17c3
|
| --- /dev/null
|
| +++ b/Source/modules/pushmessaging/PushRegistration.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef PushRegistration_h
|
| +#define PushRegistration_h
|
| +
|
| +#include "bindings/v8/ScriptWrappable.h"
|
| +#include "public/platform/WebPushRegistration.h"
|
| +#include "wtf/text/WTFString.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +class PushRegistration FINAL : public RefCounted<PushRegistration>, public ScriptWrappable {
|
| +public:
|
| + // For CallbackPromiseAdapter.
|
| + typedef blink::WebPushRegistration WebType;
|
| + static PassRefPtr<PushRegistration> from(WebType* registration)
|
| + {
|
| + return adoptRef(new PushRegistration(registration->endpoint, registration->registrationId, registration->channelName));
|
| + }
|
| +
|
| + virtual ~PushRegistration();
|
| +
|
| + const String& pushEndpoint() const { return m_pushEndpoint; }
|
| + const String& pushRegistrationId() const { return m_pushRegistrationId; }
|
| + const String& channelName() const { return m_channelName; }
|
| +
|
| +private:
|
| + PushRegistration(const String& pushEndpoint, const String& pushRegistrationId, const String& channelName);
|
| +
|
| + String m_pushEndpoint;
|
| + String m_pushRegistrationId;
|
| + String m_channelName;
|
| +};
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // PushRegistration_h
|
|
|