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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 | 33 |
34 #if ENABLE(LEGACY_NOTIFICATIONS) | 34 #if 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/WorkerGlobalScope.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 "platform/weborigin/SecurityOrigin.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 PassRefPtr<NotificationCenter> NotificationCenter::create(ExecutionContext* cont
ext, NotificationClient* client) | 45 PassRefPtr<NotificationCenter> NotificationCenter::create(ExecutionContext* cont
ext, 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(); |
50 } | 50 } |
51 | 51 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) | 131 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) |
132 { | 132 { |
133 if (m_callback) | 133 if (m_callback) |
134 m_callback->handleEvent(); | 134 m_callback->handleEvent(); |
135 m_notificationCenter->requestTimedOut(this); | 135 m_notificationCenter->requestTimedOut(this); |
136 } | 136 } |
137 | 137 |
138 } // namespace WebCore | 138 } // namespace WebCore |
139 | 139 |
140 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 140 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |