OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #include "modules/notifications/NotificationCenter.h" | 36 #include "modules/notifications/NotificationCenter.h" |
37 | 37 |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/workers/WorkerGlobalScope.h" | 39 #include "core/workers/WorkerGlobalScope.h" |
40 #include "modules/notifications/NotificationClient.h" | 40 #include "modules/notifications/NotificationClient.h" |
41 #include "platform/weborigin/SecurityOrigin.h" | 41 #include "platform/weborigin/SecurityOrigin.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 DEFINE_GC_INFO(NotificationCenter); | |
46 DEFINE_GC_INFO(NotificationCenter::NotificationRequestCallback); | |
47 | |
48 PassRefPtrWillBeRawPtr<NotificationCenter> NotificationCenter::create(ExecutionC
ontext* context, NotificationClient* client) | 45 PassRefPtrWillBeRawPtr<NotificationCenter> NotificationCenter::create(ExecutionC
ontext* context, NotificationClient* client) |
49 { | 46 { |
50 RefPtrWillBeRawPtr<NotificationCenter> notificationCenter = adoptRefWillBeNo
op(new NotificationCenter(context, client)); | 47 RefPtrWillBeRawPtr<NotificationCenter> notificationCenter = adoptRefWillBeNo
op(new NotificationCenter(context, client)); |
51 notificationCenter->suspendIfNeeded(); | 48 notificationCenter->suspendIfNeeded(); |
52 return notificationCenter.release(); | 49 return notificationCenter.release(); |
53 } | 50 } |
54 | 51 |
55 NotificationCenter::NotificationCenter(ExecutionContext* context, NotificationCl
ient* client) | 52 NotificationCenter::NotificationCenter(ExecutionContext* context, NotificationCl
ient* client) |
56 : ActiveDOMObject(context) | 53 : ActiveDOMObject(context) |
57 , m_client(client) | 54 , m_client(client) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 135 } |
139 | 136 |
140 void NotificationCenter::NotificationRequestCallback::trace(Visitor* visitor) | 137 void NotificationCenter::NotificationRequestCallback::trace(Visitor* visitor) |
141 { | 138 { |
142 visitor->trace(m_notificationCenter); | 139 visitor->trace(m_notificationCenter); |
143 } | 140 } |
144 | 141 |
145 } // namespace WebCore | 142 } // namespace WebCore |
146 | 143 |
147 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 144 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |