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

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: rebase 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
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..5612ad0be9d5bf211a36981cada2ee7145834739 100644
--- a/Source/modules/push_messaging/PushRegistration.h
+++ b/Source/modules/push_messaging/PushRegistration.h
@@ -5,6 +5,7 @@
#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"
@@ -12,28 +13,32 @@
namespace blink {
+class ServiceWorkerRegistration;
class ScriptPromiseResolver;
+class ScriptState;
class PushRegistration final : public GarbageCollectedFinalized<PushRegistration>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
// For CallbackPromiseAdapter.
typedef WebPushRegistration WebType;
Michael van Ouwerkerk 2014/12/12 12:18:04 It seems you don't need this for CallbackPromiseAd
mlamouri (slow - plz ping) 2014/12/15 10:55:07 Done.
- static PushRegistration* take(ScriptPromiseResolver*, WebType* registrationRaw);
+ static PushRegistration* take(ScriptPromiseResolver*, WebType* pushRegistration, ServiceWorkerRegistration*);
static void dispose(WebType* 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_registration;
Michael van Ouwerkerk 2014/12/12 12:18:04 Please rename this to m_serviceWorkerRegistration
mlamouri (slow - plz ping) 2014/12/15 10:55:07 Done.
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698