| Index: third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp
|
| diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp b/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp
|
| index 6793c6fc8d6a1ea21f3f577a354f6fef44b25b2d..22b8da285c2a1a1c8f3ca569c31fb6bc3c9a1e7d 100644
|
| --- a/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp
|
| +++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp
|
| @@ -50,11 +50,27 @@ MediaStreamComponent* MediaStreamComponent::create(const String& id,
|
|
|
| MediaStreamComponent::MediaStreamComponent(const String& id,
|
| MediaStreamSource* source)
|
| - : m_source(source), m_id(id), m_enabled(true), m_muted(false) {
|
| + : MediaStreamComponent(id, source, true, false) {}
|
| +
|
| +MediaStreamComponent::MediaStreamComponent(const String& id,
|
| + MediaStreamSource* source,
|
| + bool enabled,
|
| + bool muted)
|
| + : m_source(source), m_id(id), m_enabled(enabled), m_muted(muted) {
|
| DCHECK(m_id.length());
|
| ThreadState::current()->registerPreFinalizer(this);
|
| }
|
|
|
| +MediaStreamComponent* MediaStreamComponent::clone() const {
|
| + MediaStreamComponent* clonedComponent = new MediaStreamComponent(
|
| + createCanonicalUUIDString(), source(), m_enabled, m_muted);
|
| + // TODO(pbos): Clone |m_trackData| as well.
|
| + // TODO(pbos): Move properties from MediaStreamTrack here so that they are
|
| + // also cloned. Part of crbug:669212 since stopped is currently not carried
|
| + // over, nor is ended().
|
| + return clonedComponent;
|
| +}
|
| +
|
| void MediaStreamComponent::dispose() {
|
| m_trackData.reset();
|
| }
|
|
|