| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ServiceWorkerRegistrationNotifications_h | 5 #ifndef ServiceWorkerRegistrationNotifications_h |
| 6 #define ServiceWorkerRegistrationNotifications_h | 6 #define ServiceWorkerRegistrationNotifications_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 11 #include "platform/heap/GarbageCollected.h" | 11 #include "platform/heap/GarbageCollected.h" |
| 12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 13 #include "platform/heap/HeapAllocator.h" | 13 #include "platform/heap/HeapAllocator.h" |
| 14 #include "platform/heap/Visitor.h" | 14 #include "platform/heap/Visitor.h" |
| 15 #include "public/platform/modules/notifications/WebNotificationManager.h" | 15 #include "public/platform/modules/notifications/WebNotificationManager.h" |
| 16 #include "wtf/Noncopyable.h" | 16 #include "wtf/Noncopyable.h" |
| 17 #include "wtf/OwnPtr.h" |
| 18 #include "wtf/PassOwnPtr.h" |
| 17 #include "wtf/PassRefPtr.h" | 19 #include "wtf/PassRefPtr.h" |
| 18 #include <memory> | |
| 19 | 20 |
| 20 namespace blink { | 21 namespace blink { |
| 21 | 22 |
| 22 class ExecutionContext; | 23 class ExecutionContext; |
| 23 class ExceptionState; | 24 class ExceptionState; |
| 24 class GetNotificationOptions; | 25 class GetNotificationOptions; |
| 25 class NotificationOptions; | 26 class NotificationOptions; |
| 26 class NotificationResourcesLoader; | 27 class NotificationResourcesLoader; |
| 27 class ScriptState; | 28 class ScriptState; |
| 28 class SecurityOrigin; | 29 class SecurityOrigin; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 void contextDestroyed() override; | 41 void contextDestroyed() override; |
| 41 | 42 |
| 42 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis
tration*); | 46 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis
tration*); |
| 46 | 47 |
| 47 static const char* supplementName(); | 48 static const char* supplementName(); |
| 48 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi
ceWorkerRegistration&); | 49 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi
ceWorkerRegistration&); |
| 49 | 50 |
| 50 void prepareShow(const WebNotificationData&, std::unique_ptr<WebNotification
ShowCallbacks>); | 51 void prepareShow(const WebNotificationData&, PassOwnPtr<WebNotificationShowC
allbacks>); |
| 51 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&
, std::unique_ptr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); | 52 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&
, PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); |
| 52 | 53 |
| 53 Member<ServiceWorkerRegistration> m_registration; | 54 Member<ServiceWorkerRegistration> m_registration; |
| 54 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; | 55 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace blink | 58 } // namespace blink |
| 58 | 59 |
| 59 #endif // ServiceWorkerRegistrationNotifications_h | 60 #endif // ServiceWorkerRegistrationNotifications_h |
| OLD | NEW |