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

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

Issue 793913002: Stub implementation for PushRegistration.unregister(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mvan_6
Patch Set: remove trace Created 6 years 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
« no previous file with comments | « Source/modules/push_messaging/PushManager.cpp ('k') | Source/modules/push_messaging/PushRegistration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushRegistration.h
diff --git a/Source/modules/push_messaging/PushRegistration.h b/Source/modules/push_messaging/PushRegistration.h
index 9608510ed34643be34d34fb69c8784a834377942..a85a4468ee52e6879767583dc1641ef06e8e2f3e 100644
--- a/Source/modules/push_messaging/PushRegistration.h
+++ b/Source/modules/push_messaging/PushRegistration.h
@@ -5,35 +5,38 @@
#ifndef PushRegistration_h
#define PushRegistration_h
+#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h"
-#include "public/platform/WebPushRegistration.h"
#include "wtf/text/WTFString.h"
namespace blink {
+class ServiceWorkerRegistration;
class ScriptPromiseResolver;
+class ScriptState;
+struct WebPushRegistration;
class PushRegistration final : public GarbageCollectedFinalized<PushRegistration>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- // For CallbackPromiseAdapter.
- typedef WebPushRegistration WebType;
- static PushRegistration* take(ScriptPromiseResolver*, WebType* registrationRaw);
- static void dispose(WebType* registrationRaw);
+ static PushRegistration* take(ScriptPromiseResolver*, WebPushRegistration*, ServiceWorkerRegistration*);
+ static void dispose(WebPushRegistration* registrationRaw);
virtual ~PushRegistration();
const String& pushEndpoint() const { return m_pushEndpoint; }
const String& pushRegistrationId() const { return m_pushRegistrationId; }
+ ScriptPromise unregister(ScriptState*);
- void trace(Visitor*) { }
+ void trace(Visitor*);
private:
- PushRegistration(const String& pushEndpoint, const String& pushRegistrationId);
+ PushRegistration(const String& pushEndpoint, const String& pushRegistrationId, ServiceWorkerRegistration*);
String m_pushEndpoint;
String m_pushRegistrationId;
+ Member<ServiceWorkerRegistration> m_serviceWorkerRegistration;
};
} // namespace blink
« no previous file with comments | « Source/modules/push_messaging/PushManager.cpp ('k') | Source/modules/push_messaging/PushRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698