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

Unified Diff: Source/modules/push_messaging/PushSubscription.h

Issue 841333002: Push API: rename registration to subscription. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use https in the spec link. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/push_messaging/PushSubscription.h
diff --git a/Source/modules/push_messaging/PushRegistration.h b/Source/modules/push_messaging/PushSubscription.h
similarity index 50%
rename from Source/modules/push_messaging/PushRegistration.h
rename to Source/modules/push_messaging/PushSubscription.h
index 48551c188ac8ee2bfe181b15480e956dc444ea64..11195deb8c00aa20a03bdd84d1c396947d865230 100644
--- a/Source/modules/push_messaging/PushRegistration.h
+++ b/Source/modules/push_messaging/PushSubscription.h
@@ -2,8 +2,8 @@
// 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
+#ifndef PushSubscription_h
+#define PushSubscription_h
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
@@ -15,30 +15,30 @@ namespace blink {
class ServiceWorkerRegistration;
class ScriptPromiseResolver;
class ScriptState;
-struct WebPushRegistration;
+struct WebPushSubscription;
-class PushRegistration final : public GarbageCollectedFinalized<PushRegistration>, public ScriptWrappable {
+class PushSubscription final : public GarbageCollectedFinalized<PushSubscription>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static PushRegistration* take(ScriptPromiseResolver*, WebPushRegistration*, ServiceWorkerRegistration*);
- static void dispose(WebPushRegistration* registrationRaw);
+ static PushSubscription* take(ScriptPromiseResolver*, WebPushSubscription*, ServiceWorkerRegistration*);
+ static void dispose(WebPushSubscription* subscriptionRaw);
- virtual ~PushRegistration();
+ virtual ~PushSubscription();
const String& endpoint() const { return m_endpoint; }
- const String& registrationId() const { return m_registrationId; }
- ScriptPromise unregister(ScriptState*);
+ const String& subscriptionId() const { return m_subscriptionId; }
+ ScriptPromise unsubscribe(ScriptState*);
void trace(Visitor*);
private:
- PushRegistration(const String& endpoint, const String& registrationId, ServiceWorkerRegistration*);
+ PushSubscription(const String& endpoint, const String& subscriptionId, ServiceWorkerRegistration*);
String m_endpoint;
- String m_registrationId;
+ String m_subscriptionId;
Member<ServiceWorkerRegistration> m_serviceWorkerRegistration;
};
} // namespace blink
-#endif // PushRegistration_h
+#endif // PushSubscription_h
« no previous file with comments | « Source/modules/push_messaging/PushRegistrationCallbacks.cpp ('k') | Source/modules/push_messaging/PushSubscription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698