Chromium Code Reviews| Index: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h |
| diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h |
| index a256622ffedf78766fa6638ace2bd0fad783e880..b42dd5f89a31d38c08279d8fea26d3ee4eb3c6d8 100644 |
| --- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h |
| +++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h |
| @@ -6,20 +6,49 @@ |
| #define ServiceWorkerRegistrationNotifications_h |
| #include "bindings/core/v8/ScriptPromise.h" |
| +#include "platform/Supplementable.h" |
| +#include "platform/heap/GarbageCollected.h" |
| +#include "platform/heap/Handle.h" |
| +#include "platform/heap/HeapAllocator.h" |
| +#include "platform/heap/Visitor.h" |
| +#include "public/platform/modules/notifications/WebNotificationManager.h" |
| +#include "wtf/Noncopyable.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/PassOwnPtr.h" |
| +#include "wtf/PassRefPtr.h" |
| namespace blink { |
| class ExceptionState; |
| class GetNotificationOptions; |
| class NotificationOptions; |
| +class NotificationResourcesLoader; |
| class ScriptState; |
| +class SecurityOrigin; |
| class ServiceWorkerRegistration; |
| +struct WebNotificationData; |
| -class ServiceWorkerRegistrationNotifications { |
| - STATIC_ONLY(ServiceWorkerRegistrationNotifications); |
| +class ServiceWorkerRegistrationNotifications final |
| + : public GarbageCollectedFinalized<ServiceWorkerRegistrationNotifications> |
| + , public Supplement<ServiceWorkerRegistration> { |
| + USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationNotifications); |
| + WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationNotifications); |
| public: |
| + virtual ~ServiceWorkerRegistrationNotifications(); |
| static ScriptPromise showNotification(ScriptState*, ServiceWorkerRegistration&, const String& title, const NotificationOptions&, ExceptionState&); |
| static ScriptPromise getNotifications(ScriptState*, ServiceWorkerRegistration&, const GetNotificationOptions&); |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| +private: |
| + explicit ServiceWorkerRegistrationNotifications(ServiceWorkerRegistration*); |
| + static const char* supplementName(); |
| + static ServiceWorkerRegistrationNotifications& from(ServiceWorkerRegistration&); |
| + void prepareShow(ExecutionContext*, const WebNotificationData&, PassOwnPtr<WebNotificationShowCallbacks>); |
|
Peter Beverloo
2016/04/13 18:32:28
micro nit: It would be nice to logically separate
Michael van Ouwerkerk
2016/04/14 13:42:12
Done.
|
| + void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&, PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); |
| + |
| + Member<ServiceWorkerRegistration> m_registration; |
| + HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; |
| }; |
| } // namespace blink |