Chromium Code Reviews| 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 10 matching lines...) Expand all Loading... | |
| 21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "modules/mediastream/MediaStream.h" | 27 #include "modules/mediastream/MediaStream.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 30 #include "core/dom/ExceptionCode.h" | 30 #include "core/dom/ExceptionCode.h" |
| 31 #include "core/frame/UseCounter.h" | |
|
Henrik Grunell
2014/08/27 05:57:30
Remove.
Vinod Keshav
2014/08/27 06:37:11
Done.
| |
| 31 #include "modules/mediastream/MediaStreamRegistry.h" | 32 #include "modules/mediastream/MediaStreamRegistry.h" |
| 32 #include "modules/mediastream/MediaStreamTrackEvent.h" | 33 #include "modules/mediastream/MediaStreamTrackEvent.h" |
| 33 #include "platform/mediastream/MediaStreamCenter.h" | 34 #include "platform/mediastream/MediaStreamCenter.h" |
| 34 #include "platform/mediastream/MediaStreamSource.h" | 35 #include "platform/mediastream/MediaStreamSource.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 static bool containsSource(MediaStreamTrackVector& trackVector, MediaStreamSourc e* source) | 39 static bool containsSource(MediaStreamTrackVector& trackVector, MediaStreamSourc e* source) |
| 39 { | 40 { |
| 40 for (size_t i = 0; i < trackVector.size(); ++i) { | 41 for (size_t i = 0; i < trackVector.size(); ++i) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 m_videoTracks = videoTracks; | 149 m_videoTracks = videoTracks; |
| 149 } | 150 } |
| 150 | 151 |
| 151 MediaStream::~MediaStream() | 152 MediaStream::~MediaStream() |
| 152 { | 153 { |
| 153 m_descriptor->setClient(0); | 154 m_descriptor->setClient(0); |
| 154 } | 155 } |
| 155 | 156 |
| 156 bool MediaStream::ended() const | 157 bool MediaStream::ended() const |
| 157 { | 158 { |
| 159 UseCounter::countDeprecation(executionContext(), UseCounter::MediaStreamEnde d); | |
|
Henrik Grunell
2014/08/27 05:57:30
Remove this.
Vinod Keshav
2014/08/27 06:37:11
Done.
| |
| 158 return m_stopped || m_descriptor->ended(); | 160 return m_stopped || m_descriptor->ended(); |
| 159 } | 161 } |
| 160 | 162 |
| 161 MediaStreamTrackVector MediaStream::getTracks() | 163 MediaStreamTrackVector MediaStream::getTracks() |
| 162 { | 164 { |
| 163 MediaStreamTrackVector tracks; | 165 MediaStreamTrackVector tracks; |
| 164 for (MediaStreamTrackVector::iterator iter = m_audioTracks.begin(); iter != m_audioTracks.end(); ++iter) | 166 for (MediaStreamTrackVector::iterator iter = m_audioTracks.begin(); iter != m_audioTracks.end(); ++iter) |
| 165 tracks.append(iter->get()); | 167 tracks.append(iter->get()); |
| 166 for (MediaStreamTrackVector::iterator iter = m_videoTracks.begin(); iter != m_videoTracks.end(); ++iter) | 168 for (MediaStreamTrackVector::iterator iter = m_videoTracks.begin(); iter != m_videoTracks.end(); ++iter) |
| 167 tracks.append(iter->get()); | 169 tracks.append(iter->get()); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 | 394 |
| 393 void MediaStream::trace(Visitor* visitor) | 395 void MediaStream::trace(Visitor* visitor) |
| 394 { | 396 { |
| 395 visitor->trace(m_audioTracks); | 397 visitor->trace(m_audioTracks); |
| 396 visitor->trace(m_videoTracks); | 398 visitor->trace(m_videoTracks); |
| 397 visitor->trace(m_scheduledEvents); | 399 visitor->trace(m_scheduledEvents); |
| 398 EventTargetWithInlineData::trace(visitor); | 400 EventTargetWithInlineData::trace(visitor); |
| 399 } | 401 } |
| 400 | 402 |
| 401 } // namespace blink | 403 } // namespace blink |
| OLD | NEW |