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" | |
19 #include "wtf/PassRefPtr.h" | 17 #include "wtf/PassRefPtr.h" |
| 18 #include <memory> |
20 | 19 |
21 namespace blink { | 20 namespace blink { |
22 | 21 |
23 class ExecutionContext; | 22 class ExecutionContext; |
24 class ExceptionState; | 23 class ExceptionState; |
25 class GetNotificationOptions; | 24 class GetNotificationOptions; |
26 class NotificationOptions; | 25 class NotificationOptions; |
27 class NotificationResourcesLoader; | 26 class NotificationResourcesLoader; |
28 class ScriptState; | 27 class ScriptState; |
29 class SecurityOrigin; | 28 class SecurityOrigin; |
(...skipping 11 matching lines...) Expand all Loading... |
41 void contextDestroyed() override; | 40 void contextDestroyed() override; |
42 | 41 |
43 DECLARE_VIRTUAL_TRACE(); | 42 DECLARE_VIRTUAL_TRACE(); |
44 | 43 |
45 private: | 44 private: |
46 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis
tration*); | 45 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis
tration*); |
47 | 46 |
48 static const char* supplementName(); | 47 static const char* supplementName(); |
49 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi
ceWorkerRegistration&); | 48 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi
ceWorkerRegistration&); |
50 | 49 |
51 void prepareShow(const WebNotificationData&, PassOwnPtr<WebNotificationShowC
allbacks>); | 50 void prepareShow(const WebNotificationData&, std::unique_ptr<WebNotification
ShowCallbacks>); |
52 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&
, PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); | 51 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData&
, std::unique_ptr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); |
53 | 52 |
54 Member<ServiceWorkerRegistration> m_registration; | 53 Member<ServiceWorkerRegistration> m_registration; |
55 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; | 54 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; |
56 }; | 55 }; |
57 | 56 |
58 } // namespace blink | 57 } // namespace blink |
59 | 58 |
60 #endif // ServiceWorkerRegistrationNotifications_h | 59 #endif // ServiceWorkerRegistrationNotifications_h |
OLD | NEW |