| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 NotificationCenter::NotificationRequestCallback::NotificationRequestCallback(Not
ificationCenter* center, PassOwnPtr<VoidCallback> callback) | 118 NotificationCenter::NotificationRequestCallback::NotificationRequestCallback(Not
ificationCenter* center, PassOwnPtr<VoidCallback> callback) |
| 119 : m_notificationCenter(center) | 119 : m_notificationCenter(center) |
| 120 , m_timer(this, &NotificationCenter::NotificationRequestCallback::timerFired
) | 120 , m_timer(this, &NotificationCenter::NotificationRequestCallback::timerFired
) |
| 121 , m_callback(callback) | 121 , m_callback(callback) |
| 122 { | 122 { |
| 123 } | 123 } |
| 124 | 124 |
| 125 void NotificationCenter::NotificationRequestCallback::startTimer() | 125 void NotificationCenter::NotificationRequestCallback::startTimer() |
| 126 { | 126 { |
| 127 m_timer.startOneShot(0); | 127 m_timer.startOneShot(0, FROM_HERE); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) | 130 void NotificationCenter::NotificationRequestCallback::timerFired(Timer<Notificat
ionCenter::NotificationRequestCallback>*) |
| 131 { | 131 { |
| 132 if (m_callback) | 132 if (m_callback) |
| 133 m_callback->handleEvent(); | 133 m_callback->handleEvent(); |
| 134 m_notificationCenter->requestTimedOut(this); | 134 m_notificationCenter->requestTimedOut(this); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void NotificationCenter::NotificationRequestCallback::trace(Visitor* visitor) | 137 void NotificationCenter::NotificationRequestCallback::trace(Visitor* visitor) |
| 138 { | 138 { |
| 139 visitor->trace(m_notificationCenter); | 139 visitor->trace(m_notificationCenter); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace WebCore | 142 } // namespace WebCore |
| 143 | 143 |
| 144 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 144 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
| OLD | NEW |