Chromium Code Reviews| Index: third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h |
| diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h b/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h |
| index 08809488c4ae3a8cada2806b765ac76b62db50d5..724e6c472380f021a2fc2762d5eaf96111a5fe92 100644 |
| --- a/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h |
| +++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h |
| @@ -33,6 +33,7 @@ |
| #define MediaStreamComponent_h |
| #include "platform/audio/AudioSourceProvider.h" |
| +#include "platform/heap/Handle.h" |
| #include "wtf/PassOwnPtr.h" |
| #include "wtf/PassRefPtr.h" |
| #include "wtf/RefCounted.h" |
| @@ -44,15 +45,15 @@ namespace blink { |
| class MediaStreamSource; |
| class WebAudioSourceProvider; |
| -class PLATFORM_EXPORT MediaStreamComponent final : public RefCounted<MediaStreamComponent> { |
| +class PLATFORM_EXPORT MediaStreamComponent final : public GarbageCollectedFinalized<MediaStreamComponent> { |
| public: |
| class ExtraData { |
| public: |
| virtual ~ExtraData() { } |
| }; |
| - static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource>); |
| - static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr<MediaStreamSource>); |
| + static MediaStreamComponent* create(MediaStreamSource*); |
| + static MediaStreamComponent* create(const String& id, MediaStreamSource*); |
| MediaStreamSource* source() const { return m_source.get(); } |
| @@ -70,8 +71,11 @@ public: |
| ExtraData* extraData() const { return m_extraData.get(); } |
| void setExtraData(PassOwnPtr<ExtraData> extraData) { m_extraData = extraData; } |
| + EAGERLY_FINALIZE(); |
|
haraken
2015/10/02 04:35:09
Add a comment and mention that this needs to be ea
peria
2015/10/02 05:48:54
Done.
|
| + DECLARE_TRACE(); |
| + |
| private: |
| - MediaStreamComponent(const String& id, PassRefPtr<MediaStreamSource>); |
| + MediaStreamComponent(const String& id, MediaStreamSource*); |
| #if ENABLE(WEB_AUDIO) |
| // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() |
| @@ -100,14 +104,14 @@ private: |
| AudioSourceProviderImpl m_sourceProvider; |
| #endif // ENABLE(WEB_AUDIO) |
| - RefPtr<MediaStreamSource> m_source; |
| + Member<MediaStreamSource> m_source; |
| String m_id; |
| bool m_enabled; |
| bool m_muted; |
| OwnPtr<ExtraData> m_extraData; |
| }; |
| -typedef Vector<RefPtr<MediaStreamComponent>> MediaStreamComponentVector; |
| +typedef HeapVector<Member<MediaStreamComponent>> MediaStreamComponentVector; |
| } // namespace blink |