Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp

Issue 2767963002: Revert of Remove |remote| and |readonly| members of MediaStreamTrack. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * 7 *
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "platform/mediastream/MediaStreamSource.h" 31 #include "platform/mediastream/MediaStreamSource.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 MediaStreamSource* MediaStreamSource::create(const String& id, 35 MediaStreamSource* MediaStreamSource::create(const String& id,
36 StreamType type, 36 StreamType type,
37 const String& name, 37 const String& name,
38 bool remote,
38 ReadyState readyState, 39 ReadyState readyState,
39 bool requiresConsumer) { 40 bool requiresConsumer) {
40 return new MediaStreamSource(id, type, name, readyState, requiresConsumer); 41 return new MediaStreamSource(id, type, name, remote, readyState,
42 requiresConsumer);
41 } 43 }
42 44
43 MediaStreamSource::MediaStreamSource(const String& id, 45 MediaStreamSource::MediaStreamSource(const String& id,
44 StreamType type, 46 StreamType type,
45 const String& name, 47 const String& name,
48 bool remote,
46 ReadyState readyState, 49 ReadyState readyState,
47 bool requiresConsumer) 50 bool requiresConsumer)
48 : m_id(id), 51 : m_id(id),
49 m_type(type), 52 m_type(type),
50 m_name(name), 53 m_name(name),
54 m_remote(remote),
51 m_readyState(readyState), 55 m_readyState(readyState),
52 m_requiresConsumer(requiresConsumer) {} 56 m_requiresConsumer(requiresConsumer) {}
53 57
54 void MediaStreamSource::setReadyState(ReadyState readyState) { 58 void MediaStreamSource::setReadyState(ReadyState readyState) {
55 if (m_readyState != ReadyStateEnded && m_readyState != readyState) { 59 if (m_readyState != ReadyStateEnded && m_readyState != readyState) {
56 m_readyState = readyState; 60 m_readyState = readyState;
57 61
58 // Observers may dispatch events which create and add new Observers; 62 // Observers may dispatch events which create and add new Observers;
59 // take a snapshot so as to safely iterate. 63 // take a snapshot so as to safely iterate.
60 HeapVector<Member<Observer>> observers; 64 HeapVector<Member<Observer>> observers;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 MutexLocker locker(m_audioConsumersLock); 106 MutexLocker locker(m_audioConsumersLock);
103 for (AudioDestinationConsumer* consumer : m_audioConsumers) 107 for (AudioDestinationConsumer* consumer : m_audioConsumers)
104 consumer->consumeAudio(bus, numberOfFrames); 108 consumer->consumeAudio(bus, numberOfFrames);
105 } 109 }
106 110
107 DEFINE_TRACE(MediaStreamSource) { 111 DEFINE_TRACE(MediaStreamSource) {
108 visitor->trace(m_observers); 112 visitor->trace(m_observers);
109 } 113 }
110 114
111 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698