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

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

Issue 1929493002: Remove unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add two leftover classes needing same treatment Created 4 years, 7 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 12 matching lines...) Expand all
23 class ExecutionContext; 23 class ExecutionContext;
24 class ExceptionState; 24 class ExceptionState;
25 class GetNotificationOptions; 25 class GetNotificationOptions;
26 class NotificationOptions; 26 class NotificationOptions;
27 class NotificationResourcesLoader; 27 class NotificationResourcesLoader;
28 class ScriptState; 28 class ScriptState;
29 class SecurityOrigin; 29 class SecurityOrigin;
30 class ServiceWorkerRegistration; 30 class ServiceWorkerRegistration;
31 struct WebNotificationData; 31 struct WebNotificationData;
32 32
33 class ServiceWorkerRegistrationNotifications final : public GarbageCollectedFina lized<ServiceWorkerRegistrationNotifications>, public Supplement<ServiceWorkerRe gistration>, public ContextLifecycleObserver { 33 class ServiceWorkerRegistrationNotifications final : public GarbageCollected<Ser viceWorkerRegistrationNotifications>, public Supplement<ServiceWorkerRegistratio n>, public ContextLifecycleObserver {
34 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationNotifications); 34 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationNotifications);
35 WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationNotifications); 35 WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationNotifications);
36 public: 36 public:
37 ~ServiceWorkerRegistrationNotifications();
38 static ScriptPromise showNotification(ScriptState*, ServiceWorkerRegistratio n&, const String& title, const NotificationOptions&, ExceptionState&); 37 static ScriptPromise showNotification(ScriptState*, ServiceWorkerRegistratio n&, const String& title, const NotificationOptions&, ExceptionState&);
39 static ScriptPromise getNotifications(ScriptState*, ServiceWorkerRegistratio n&, const GetNotificationOptions&); 38 static ScriptPromise getNotifications(ScriptState*, ServiceWorkerRegistratio n&, const GetNotificationOptions&);
40 39
41 // ContextLifecycleObserver interface. 40 // ContextLifecycleObserver interface.
42 void contextDestroyed() override; 41 void contextDestroyed() override;
43 42
44 DECLARE_VIRTUAL_TRACE(); 43 DECLARE_VIRTUAL_TRACE();
45 44
46 private: 45 private:
47 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis tration*); 46 ServiceWorkerRegistrationNotifications(ExecutionContext*, ServiceWorkerRegis tration*);
48 47
49 static const char* supplementName(); 48 static const char* supplementName();
50 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi ceWorkerRegistration&); 49 static ServiceWorkerRegistrationNotifications& from(ExecutionContext*, Servi ceWorkerRegistration&);
51 50
52 void prepareShow(const WebNotificationData&, PassOwnPtr<WebNotificationShowC allbacks>); 51 void prepareShow(const WebNotificationData&, PassOwnPtr<WebNotificationShowC allbacks>);
53 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData& , PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*); 52 void didLoadResources(PassRefPtr<SecurityOrigin>, const WebNotificationData& , PassOwnPtr<WebNotificationShowCallbacks>, NotificationResourcesLoader*);
54 53
55 Member<ServiceWorkerRegistration> m_registration; 54 Member<ServiceWorkerRegistration> m_registration;
56 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders; 55 HeapHashSet<Member<NotificationResourcesLoader>> m_loaders;
57 }; 56 };
58 57
59 } // namespace blink 58 } // namespace blink
60 59
61 #endif // ServiceWorkerRegistrationNotifications_h 60 #endif // ServiceWorkerRegistrationNotifications_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698