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

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

Issue 783983003: Push API: move PushManager from Navigator to ServiceWorkerRegistration [switchover 6/6] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/PushManager.h
diff --git a/Source/modules/push_messaging/PushManager.h b/Source/modules/push_messaging/PushManager.h
index 7596e71292ccfa29430bd3cb424f93fee901b27a..27b86a9c5ea9b7304dd386b465844c167e74cff6 100644
--- a/Source/modules/push_messaging/PushManager.h
+++ b/Source/modules/push_messaging/PushManager.h
@@ -12,22 +12,25 @@ namespace blink {
class ScriptPromise;
class ScriptState;
+class ServiceWorkerRegistration;
class PushManager final : public GarbageCollected<PushManager>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static PushManager* create()
+ static PushManager* create(ServiceWorkerRegistration* registration)
{
- return new PushManager();
+ return new PushManager(registration);
}
ScriptPromise registerPushMessaging(ScriptState*);
ScriptPromise hasPermission(ScriptState*);
- void trace(Visitor*) { }
+ void trace(Visitor*);
private:
- PushManager();
+ explicit PushManager(ServiceWorkerRegistration*);
+
+ Member<ServiceWorkerRegistration> m_registration;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698