| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 const AtomicString& RTCDataChannel::interfaceName() const | 287 const AtomicString& RTCDataChannel::interfaceName() const |
| 288 { | 288 { |
| 289 return EventTargetNames::RTCDataChannel; | 289 return EventTargetNames::RTCDataChannel; |
| 290 } | 290 } |
| 291 | 291 |
| 292 ExecutionContext* RTCDataChannel::getExecutionContext() const | 292 ExecutionContext* RTCDataChannel::getExecutionContext() const |
| 293 { | 293 { |
| 294 return m_executionContext; | 294 return m_executionContext; |
| 295 } | 295 } |
| 296 | 296 |
| 297 void RTCDataChannel::scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 297 void RTCDataChannel::scheduleDispatchEvent(RawPtr<Event> event) |
| 298 { | 298 { |
| 299 m_scheduledEvents.append(event); | 299 m_scheduledEvents.append(event); |
| 300 | 300 |
| 301 if (!m_scheduledEventTimer.isActive()) | 301 if (!m_scheduledEventTimer.isActive()) |
| 302 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); | 302 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void RTCDataChannel::scheduledEventTimerFired(Timer<RTCDataChannel>*) | 305 void RTCDataChannel::scheduledEventTimerFired(Timer<RTCDataChannel>*) |
| 306 { | 306 { |
| 307 WillBeHeapVector<RefPtrWillBeMember<Event>> events; | 307 HeapVector<Member<Event>> events; |
| 308 events.swap(m_scheduledEvents); | 308 events.swap(m_scheduledEvents); |
| 309 | 309 |
| 310 WillBeHeapVector<RefPtrWillBeMember<Event>>::iterator it = events.begin(); | 310 HeapVector<Member<Event>>::iterator it = events.begin(); |
| 311 for (; it != events.end(); ++it) | 311 for (; it != events.end(); ++it) |
| 312 dispatchEvent((*it).release()); | 312 dispatchEvent((*it).release()); |
| 313 | 313 |
| 314 events.clear(); | 314 events.clear(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 DEFINE_TRACE(RTCDataChannel) | 317 DEFINE_TRACE(RTCDataChannel) |
| 318 { | 318 { |
| 319 visitor->trace(m_executionContext); | 319 visitor->trace(m_executionContext); |
| 320 visitor->trace(m_scheduledEvents); | 320 visitor->trace(m_scheduledEvents); |
| 321 RefCountedGarbageCollectedEventTargetWithInlineData<RTCDataChannel>::trace(v
isitor); | 321 RefCountedGarbageCollectedEventTargetWithInlineData<RTCDataChannel>::trace(v
isitor); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace blink | 324 } // namespace blink |
| OLD | NEW |