Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 | 31 |
| 32 #include "core/workers/WorkerSupplementable.h" | 32 #include "core/workers/WorkerSupplementable.h" |
| 33 #include "heap/Handle.h" | 33 #include "heap/Handle.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 Finalized<WorkerGlobalScopeNotifications>, public WorkerSupplement { |
| 42 public: | 42 public: |
| 43 virtual ~WorkerGlobalScopeNotifications(); | 43 virtual ~WorkerGlobalScopeNotifications(); |
| 44 | 44 |
| 45 static NotificationCenter* webkitNotifications(WorkerGlobalScope&); | 45 static NotificationCenter* webkitNotifications(WorkerGlobalScope&); |
| 46 static WorkerGlobalScopeNotifications& from(WorkerGlobalScope&); | 46 static WorkerGlobalScopeNotifications& from(WorkerGlobalScope&); |
| 47 | 47 |
| 48 virtual void trace(Visitor*); | |
| 49 | |
| 48 private: | 50 private: |
| 49 explicit WorkerGlobalScopeNotifications(WorkerGlobalScope&); | 51 explicit WorkerGlobalScopeNotifications(RawPtr<WorkerGlobalScope>); |
| 50 | 52 |
| 51 NotificationCenter* webkitNotifications(); | 53 NotificationCenter* webkitNotifications(); |
| 52 static const char* supplementName(); | 54 static const char* supplementName(); |
| 53 | 55 |
| 54 WorkerGlobalScope& m_context; | 56 RawPtrWillBeMember<WorkerGlobalScope> m_context; |
|
sof
2014/02/26 12:26:05
Note: changed this to be a raw-ptr/member instead
Mads Ager (chromium)
2014/02/26 13:09:08
Yeah, I'm a bit unsure about these. We lose the cl
sof
2014/02/26 14:36:25
Has the ability to declare const-like Members been
Mads Ager (chromium)
2014/02/26 15:10:19
In principle you should be able to use 'const RefP
| |
| 55 RefPtrWillBePersistent<NotificationCenter> m_notificationCenter; | 57 RefPtrWillBeMember<NotificationCenter> m_notificationCenter; |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // namespace WebCore | 60 } // namespace WebCore |
| 59 | 61 |
| 60 #endif // WorkerGlobalScopeNotifications_h | 62 #endif // WorkerGlobalScopeNotifications_h |
| 61 | 63 |
| 62 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 64 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
| OLD | NEW |