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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp

Issue 2710213005: Revert of Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Created 3 years, 10 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 WebMediaStreamSource::operator MediaStreamSource*() const { 86 WebMediaStreamSource::operator MediaStreamSource*() const {
87 return m_private.get(); 87 return m_private.get();
88 } 88 }
89 89
90 void WebMediaStreamSource::initialize(const WebString& id, 90 void WebMediaStreamSource::initialize(const WebString& id,
91 Type type, 91 Type type,
92 const WebString& name) { 92 const WebString& name) {
93 m_private = MediaStreamSource::create( 93 m_private = MediaStreamSource::create(
94 id, static_cast<MediaStreamSource::StreamType>(type), name); 94 id, static_cast<MediaStreamSource::StreamType>(type), name, false);
95 }
96
97 void WebMediaStreamSource::initialize(const WebString& id,
98 Type type,
99 const WebString& name,
100 bool remote) {
101 m_private = MediaStreamSource::create(
102 id, static_cast<MediaStreamSource::StreamType>(type), name, remote);
95 } 103 }
96 104
97 WebString WebMediaStreamSource::id() const { 105 WebString WebMediaStreamSource::id() const {
98 ASSERT(!m_private.isNull()); 106 ASSERT(!m_private.isNull());
99 return m_private.get()->id(); 107 return m_private.get()->id();
100 } 108 }
101 109
102 WebMediaStreamSource::Type WebMediaStreamSource::getType() const { 110 WebMediaStreamSource::Type WebMediaStreamSource::getType() const {
103 ASSERT(!m_private.isNull()); 111 ASSERT(!m_private.isNull());
104 return static_cast<Type>(m_private.get()->type()); 112 return static_cast<Type>(m_private.get()->type());
105 } 113 }
106 114
107 WebString WebMediaStreamSource::name() const { 115 WebString WebMediaStreamSource::name() const {
108 ASSERT(!m_private.isNull()); 116 ASSERT(!m_private.isNull());
109 return m_private.get()->name(); 117 return m_private.get()->name();
110 } 118 }
111 119
120 bool WebMediaStreamSource::remote() const {
121 ASSERT(!m_private.isNull());
122 return m_private.get()->remote();
123 }
124
112 void WebMediaStreamSource::setReadyState(ReadyState state) { 125 void WebMediaStreamSource::setReadyState(ReadyState state) {
113 ASSERT(!m_private.isNull()); 126 ASSERT(!m_private.isNull());
114 m_private->setReadyState(static_cast<MediaStreamSource::ReadyState>(state)); 127 m_private->setReadyState(static_cast<MediaStreamSource::ReadyState>(state));
115 } 128 }
116 129
117 WebMediaStreamSource::ReadyState WebMediaStreamSource::getReadyState() const { 130 WebMediaStreamSource::ReadyState WebMediaStreamSource::getReadyState() const {
118 ASSERT(!m_private.isNull()); 131 ASSERT(!m_private.isNull());
119 return static_cast<ReadyState>(m_private->getReadyState()); 132 return static_cast<ReadyState>(m_private->getReadyState());
120 } 133 }
121 134
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); 217 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get());
205 if (wrapper->consumer() == consumer) { 218 if (wrapper->consumer() == consumer) {
206 m_private->removeAudioConsumer(wrapper); 219 m_private->removeAudioConsumer(wrapper);
207 return true; 220 return true;
208 } 221 }
209 } 222 }
210 return false; 223 return false;
211 } 224 }
212 225
213 } // namespace blink 226 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698