| 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 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void MediaStreamTrack::propagateTrackEnded() { | 220 void MediaStreamTrack::propagateTrackEnded() { |
| 221 CHECK(!m_isIteratingRegisteredMediaStreams); | 221 CHECK(!m_isIteratingRegisteredMediaStreams); |
| 222 m_isIteratingRegisteredMediaStreams = true; | 222 m_isIteratingRegisteredMediaStreams = true; |
| 223 for (HeapHashSet<Member<MediaStream>>::iterator iter = | 223 for (HeapHashSet<Member<MediaStream>>::iterator iter = |
| 224 m_registeredMediaStreams.begin(); | 224 m_registeredMediaStreams.begin(); |
| 225 iter != m_registeredMediaStreams.end(); ++iter) | 225 iter != m_registeredMediaStreams.end(); ++iter) |
| 226 (*iter)->trackEnded(); | 226 (*iter)->trackEnded(); |
| 227 m_isIteratingRegisteredMediaStreams = false; | 227 m_isIteratingRegisteredMediaStreams = false; |
| 228 } | 228 } |
| 229 | 229 |
| 230 void MediaStreamTrack::stop() { | 230 void MediaStreamTrack::contextDestroyed() { |
| 231 m_stopped = true; | 231 m_stopped = true; |
| 232 } | 232 } |
| 233 | 233 |
| 234 bool MediaStreamTrack::hasPendingActivity() const { | 234 bool MediaStreamTrack::hasPendingActivity() const { |
| 235 // If 'ended' listeners exist and the object hasn't yet reached | 235 // If 'ended' listeners exist and the object hasn't yet reached |
| 236 // that state, keep the object alive. | 236 // that state, keep the object alive. |
| 237 // | 237 // |
| 238 // An otherwise unreachable MediaStreamTrack object in an non-ended | 238 // An otherwise unreachable MediaStreamTrack object in an non-ended |
| 239 // state will otherwise indirectly be transitioned to the 'ended' state | 239 // state will otherwise indirectly be transitioned to the 'ended' state |
| 240 // while finalizing m_component. Which dispatches an 'ended' event, | 240 // while finalizing m_component. Which dispatches an 'ended' event, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 | 276 |
| 277 DEFINE_TRACE(MediaStreamTrack) { | 277 DEFINE_TRACE(MediaStreamTrack) { |
| 278 visitor->trace(m_registeredMediaStreams); | 278 visitor->trace(m_registeredMediaStreams); |
| 279 visitor->trace(m_component); | 279 visitor->trace(m_component); |
| 280 EventTargetWithInlineData::trace(visitor); | 280 EventTargetWithInlineData::trace(visitor); |
| 281 ActiveDOMObject::trace(visitor); | 281 ActiveDOMObject::trace(visitor); |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace blink | 284 } // namespace blink |
| OLD | NEW |