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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h

Issue 2651613002: Use a new Supplement constructor for ServiceWorkerRegistration supplements (Closed)
Patch Set: temp Created 3 years, 10 months 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 unified diff | Download patch
OLDNEW
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"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static ScriptPromise getNotifications(ScriptState*, 45 static ScriptPromise getNotifications(ScriptState*,
46 ServiceWorkerRegistration&, 46 ServiceWorkerRegistration&,
47 const GetNotificationOptions&); 47 const GetNotificationOptions&);
48 48
49 // ContextLifecycleObserver interface. 49 // ContextLifecycleObserver interface.
50 void contextDestroyed(ExecutionContext*) override; 50 void contextDestroyed(ExecutionContext*) override;
51 51
52 DECLARE_VIRTUAL_TRACE(); 52 DECLARE_VIRTUAL_TRACE();
53 53
54 private: 54 private:
55 ServiceWorkerRegistrationNotifications(ExecutionContext*, 55 ServiceWorkerRegistrationNotifications(ServiceWorkerRegistration&,
56 ServiceWorkerRegistration*); 56 ExecutionContext*);
57 57
58 static const char* supplementName(); 58 static const char* supplementName();
59 static ServiceWorkerRegistrationNotifications& from( 59 static ServiceWorkerRegistrationNotifications& from(
60 ExecutionContext*, 60 ExecutionContext*,
61 ServiceWorkerRegistration&); 61 ServiceWorkerRegistration&);
62 62
63 void prepareShow(const WebNotificationData&, 63 void prepareShow(const WebNotificationData&,
64 std::unique_ptr<WebNotificationShowCallbacks>); 64 std::unique_ptr<WebNotificationShowCallbacks>);
65 void didLoadResources(PassRefPtr<SecurityOrigin>, 65 void didLoadResources(PassRefPtr<SecurityOrigin>,
66 const WebNotificationData&, 66 const WebNotificationData&,
67 std::unique_ptr<WebNotificationShowCallbacks>, 67 std::unique_ptr<WebNotificationShowCallbacks>,
68 NotificationResourcesLoader*); 68 NotificationResourcesLoader*);
69 69
70 Member<ServiceWorkerRegistration> m_registration;
71 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; 70 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders;
72 }; 71 };
73 72
74 } // namespace blink 73 } // namespace blink
75 74
76 #endif // ServiceWorkerRegistrationNotifications_h 75 #endif // ServiceWorkerRegistrationNotifications_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698