| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef WorkerGlobalScopeNotifications_h | 27 #ifndef WorkerGlobalScopeNotifications_h |
| 28 #define WorkerGlobalScopeNotifications_h | 28 #define WorkerGlobalScopeNotifications_h |
| 29 | 29 |
| 30 #if ENABLE(LEGACY_NOTIFICATIONS) | 30 #if ENABLE(LEGACY_NOTIFICATIONS) |
| 31 | 31 |
| 32 #include "core/workers/WorkerSupplementable.h" | |
| 33 #include "heap/Handle.h" | 32 #include "heap/Handle.h" |
| 33 #include "platform/Supplementable.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 class NotificationCenter; | 37 class NotificationCenter; |
| 38 class ExecutionContext; | 38 class ExecutionContext; |
| 39 class WorkerGlobalScope; | 39 class WorkerGlobalScope; |
| 40 | 40 |
| 41 class WorkerGlobalScopeNotifications FINAL : public WorkerSupplement { | 41 class WorkerGlobalScopeNotifications FINAL : public NoBaseWillBeGarbageCollected
<WorkerGlobalScopeNotifications>, public WillBeHeapSupplement<WorkerGlobalScope>
{ |
| 42 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScopeNotifications); |
| 42 public: | 43 public: |
| 43 virtual ~WorkerGlobalScopeNotifications(); | 44 virtual ~WorkerGlobalScopeNotifications(); |
| 44 | 45 |
| 45 static NotificationCenter* webkitNotifications(WorkerGlobalScope&); | 46 static NotificationCenter* webkitNotifications(WorkerGlobalScope&); |
| 46 static WorkerGlobalScopeNotifications& from(WorkerGlobalScope&); | 47 static WorkerGlobalScopeNotifications& from(WorkerGlobalScope&); |
| 47 | 48 |
| 49 virtual void trace(Visitor*); |
| 50 |
| 48 private: | 51 private: |
| 49 explicit WorkerGlobalScopeNotifications(WorkerGlobalScope&); | 52 explicit WorkerGlobalScopeNotifications(WorkerGlobalScope*); |
| 50 | 53 |
| 51 NotificationCenter* webkitNotifications(); | 54 NotificationCenter* webkitNotifications(); |
| 52 static const char* supplementName(); | 55 static const char* supplementName(); |
| 53 | 56 |
| 54 WorkerGlobalScope& m_context; | 57 RawPtrWillBeMember<WorkerGlobalScope> m_context; |
| 55 RefPtrWillBePersistent<NotificationCenter> m_notificationCenter; | 58 RefPtrWillBeMember<NotificationCenter> m_notificationCenter; |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 } // namespace WebCore | 61 } // namespace WebCore |
| 59 | 62 |
| 60 #endif // WorkerGlobalScopeNotifications_h | 63 #endif // WorkerGlobalScopeNotifications_h |
| 61 | 64 |
| 62 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 65 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
| OLD | NEW |