| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011, 2012 Ericsson AB. 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 365 |
| 366 if (!m_scheduledEventTimer.isActive()) | 366 if (!m_scheduledEventTimer.isActive()) |
| 367 m_scheduledEventTimer.startOneShot(0, FROM_HERE); | 367 m_scheduledEventTimer.startOneShot(0, FROM_HERE); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void MediaStream::scheduledEventTimerFired(Timer<MediaStream>*) | 370 void MediaStream::scheduledEventTimerFired(Timer<MediaStream>*) |
| 371 { | 371 { |
| 372 if (m_stopped) | 372 if (m_stopped) |
| 373 return; | 373 return; |
| 374 | 374 |
| 375 WillBeHeapVector<RefPtrWillBeMember<Event> > events; | 375 WillBeHeapVector<RefPtrWillBeMember<Event>> events; |
| 376 events.swap(m_scheduledEvents); | 376 events.swap(m_scheduledEvents); |
| 377 | 377 |
| 378 WillBeHeapVector<RefPtrWillBeMember<Event> >::iterator it = events.begin(); | 378 WillBeHeapVector<RefPtrWillBeMember<Event>>::iterator it = events.begin(); |
| 379 for (; it != events.end(); ++it) | 379 for (; it != events.end(); ++it) |
| 380 dispatchEvent((*it).release()); | 380 dispatchEvent((*it).release()); |
| 381 | 381 |
| 382 events.clear(); | 382 events.clear(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 URLRegistry& MediaStream::registry() const | 385 URLRegistry& MediaStream::registry() const |
| 386 { | 386 { |
| 387 return MediaStreamRegistry::registry(); | 387 return MediaStreamRegistry::registry(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 void MediaStream::trace(Visitor* visitor) | 390 void MediaStream::trace(Visitor* visitor) |
| 391 { | 391 { |
| 392 visitor->trace(m_audioTracks); | 392 visitor->trace(m_audioTracks); |
| 393 visitor->trace(m_videoTracks); | 393 visitor->trace(m_videoTracks); |
| 394 visitor->trace(m_scheduledEvents); | 394 visitor->trace(m_scheduledEvents); |
| 395 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStream>::trace(visi
tor); | 395 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStream>::trace(visi
tor); |
| 396 ContextLifecycleObserver::trace(visitor); | 396 ContextLifecycleObserver::trace(visitor); |
| 397 } | 397 } |
| 398 | 398 |
| 399 } // namespace blink | 399 } // namespace blink |
| OLD | NEW |