| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 void RTCDataChannel::scheduleDispatchEvent(Event* event) | 373 void RTCDataChannel::scheduleDispatchEvent(Event* event) |
| 374 { | 374 { |
| 375 m_scheduledEvents.append(event); | 375 m_scheduledEvents.append(event); |
| 376 | 376 |
| 377 if (!m_scheduledEventTimer.isActive()) | 377 if (!m_scheduledEventTimer.isActive()) |
| 378 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); | 378 m_scheduledEventTimer.startOneShot(0, BLINK_FROM_HERE); |
| 379 } | 379 } |
| 380 | 380 |
| 381 void RTCDataChannel::scheduledEventTimerFired(Timer<RTCDataChannel>*) | 381 void RTCDataChannel::scheduledEventTimerFired(TimerBase*) |
| 382 { | 382 { |
| 383 HeapVector<Member<Event>> events; | 383 HeapVector<Member<Event>> events; |
| 384 events.swap(m_scheduledEvents); | 384 events.swap(m_scheduledEvents); |
| 385 | 385 |
| 386 HeapVector<Member<Event>>::iterator it = events.begin(); | 386 HeapVector<Member<Event>>::iterator it = events.begin(); |
| 387 for (; it != events.end(); ++it) | 387 for (; it != events.end(); ++it) |
| 388 dispatchEvent((*it).release()); | 388 dispatchEvent((*it).release()); |
| 389 | 389 |
| 390 events.clear(); | 390 events.clear(); |
| 391 } | 391 } |
| 392 | 392 |
| 393 DEFINE_TRACE(RTCDataChannel) | 393 DEFINE_TRACE(RTCDataChannel) |
| 394 { | 394 { |
| 395 visitor->trace(m_scheduledEvents); | 395 visitor->trace(m_scheduledEvents); |
| 396 EventTargetWithInlineData::trace(visitor); | 396 EventTargetWithInlineData::trace(visitor); |
| 397 ActiveDOMObject::trace(visitor); | 397 ActiveDOMObject::trace(visitor); |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace blink | 400 } // namespace blink |
| OLD | NEW |