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 18 matching lines...) Expand all Loading... |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 | 33 |
34 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) | 34 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
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/WorkerContext.h" | 39 #include "core/workers/WorkerGlobalScope.h" |
40 #include "modules/notifications/NotificationClient.h" | 40 #include "modules/notifications/NotificationClient.h" |
41 #include "weborigin/SecurityOrigin.h" | 41 #include "weborigin/SecurityOrigin.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 PassRefPtr<NotificationCenter> NotificationCenter::create(ScriptExecutionContext
* context, NotificationClient* client) | 45 PassRefPtr<NotificationCenter> NotificationCenter::create(ScriptExecutionContext
* context, NotificationClient* client) |
46 { | 46 { |
47 RefPtr<NotificationCenter> notificationCenter(adoptRef(new NotificationCente
r(context, client))); | 47 RefPtr<NotificationCenter> notificationCenter(adoptRef(new NotificationCente
r(context, client))); |
48 notificationCenter->suspendIfNeeded(); | 48 notificationCenter->suspendIfNeeded(); |
49 return notificationCenter.release(); | 49 return notificationCenter.release(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) | 133 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) |
134 { | 134 { |
135 if (m_callback) | 135 if (m_callback) |
136 m_callback->handleEvent(); | 136 m_callback->handleEvent(); |
137 m_notificationCenter->requestTimedOut(this); | 137 m_notificationCenter->requestTimedOut(this); |
138 } | 138 } |
139 | 139 |
140 } // namespace WebCore | 140 } // namespace WebCore |
141 | 141 |
142 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) | 142 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |