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

Unified Diff: Source/modules/push_messaging/ServiceWorkerRegistrationPush.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: Address review comments. 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/ServiceWorkerRegistrationPush.h
diff --git a/Source/modules/push_messaging/ServiceWorkerRegistrationPush.h b/Source/modules/push_messaging/ServiceWorkerRegistrationPush.h
new file mode 100644
index 0000000000000000000000000000000000000000..bea5c9de10a958de3aa8669d991e4a9759be6f6d
--- /dev/null
+++ b/Source/modules/push_messaging/ServiceWorkerRegistrationPush.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ServiceWorkerRegistrationPush_h
+#define ServiceWorkerRegistrationPush_h
+
+#include "platform/Supplementable.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class PushManager;
+class ServiceWorkerRegistration;
+
+class ServiceWorkerRegistrationPush final : public GarbageCollectedFinalized<ServiceWorkerRegistrationPush>, public HeapSupplement<ServiceWorkerRegistration> {
+ USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationPush);
+ WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationPush);
+public:
+ virtual ~ServiceWorkerRegistrationPush();
+ static ServiceWorkerRegistrationPush& from(ServiceWorkerRegistration&);
+
+ static PushManager* pushManager(ServiceWorkerRegistration&);
+ PushManager* pushManager();
+
+ virtual void trace(Visitor*) override;
+
+private:
+ explicit ServiceWorkerRegistrationPush(ServiceWorkerRegistration*);
+ static const char* supplementName();
+
+ Member<ServiceWorkerRegistration> m_registration;
+ Member<PushManager> m_pushManager;
+};
+
+} // namespace blink
+
+#endif // ServiceWorkerRegistrationPush_h
« no previous file with comments | « Source/modules/push_messaging/PushManager.cpp ('k') | Source/modules/push_messaging/ServiceWorkerRegistrationPush.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698