| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 { | 135 { |
| 136 return ActiveDOMObject::getExecutionContext(); | 136 return ActiveDOMObject::getExecutionContext(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void RTCDTMFSender::stop() | 139 void RTCDTMFSender::stop() |
| 140 { | 140 { |
| 141 m_stopped = true; | 141 m_stopped = true; |
| 142 m_handler->setClient(0); | 142 m_handler->setClient(0); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void RTCDTMFSender::scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 145 void RTCDTMFSender::scheduleDispatchEvent(RawPtr<Event> event) |
| 146 { | 146 { |
| 147 m_scheduledEvents.append(event); | 147 m_scheduledEvents.append(event); |
| 148 | 148 |
| 149 if (!m_scheduledEventTimer.isActive()) | 149 if (!m_scheduledEventTimer.isActive()) |
| 150 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); | 150 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void RTCDTMFSender::scheduledEventTimerFired(Timer<RTCDTMFSender>*) | 153 void RTCDTMFSender::scheduledEventTimerFired(Timer<RTCDTMFSender>*) |
| 154 { | 154 { |
| 155 if (m_stopped) | 155 if (m_stopped) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 WillBeHeapVector<RefPtrWillBeMember<Event>> events; | 158 HeapVector<Member<Event>> events; |
| 159 events.swap(m_scheduledEvents); | 159 events.swap(m_scheduledEvents); |
| 160 | 160 |
| 161 WillBeHeapVector<RefPtrWillBeMember<Event>>::iterator it = events.begin(); | 161 HeapVector<Member<Event>>::iterator it = events.begin(); |
| 162 for (; it != events.end(); ++it) | 162 for (; it != events.end(); ++it) |
| 163 dispatchEvent((*it).release()); | 163 dispatchEvent((*it).release()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 DEFINE_TRACE(RTCDTMFSender) | 166 DEFINE_TRACE(RTCDTMFSender) |
| 167 { | 167 { |
| 168 visitor->trace(m_track); | 168 visitor->trace(m_track); |
| 169 visitor->trace(m_scheduledEvents); | 169 visitor->trace(m_scheduledEvents); |
| 170 RefCountedGarbageCollectedEventTargetWithInlineData<RTCDTMFSender>::trace(vi
sitor); | 170 RefCountedGarbageCollectedEventTargetWithInlineData<RTCDTMFSender>::trace(vi
sitor); |
| 171 ActiveDOMObject::trace(visitor); | 171 ActiveDOMObject::trace(visitor); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |