Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: Source/modules/pushmessaging/PushRegistration.h

Issue 152763002: DO NOT REVIEW Bindings and plumbing for push messaging API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Address some review comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « Source/modules/pushmessaging/PushMessagingError.cpp ('k') | Source/modules/pushmessaging/PushRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698