| Index: Source/platform/mediastream/MediaStreamSource.h
|
| diff --git a/Source/platform/mediastream/MediaStreamSource.h b/Source/platform/mediastream/MediaStreamSource.h
|
| index cc24cdc7ccd1c84f9de16e413f14ba78d00230bd..01dc653ff8e475228e1ff6242b730946c7290cfd 100644
|
| --- a/Source/platform/mediastream/MediaStreamSource.h
|
| +++ b/Source/platform/mediastream/MediaStreamSource.h
|
| @@ -34,22 +34,23 @@
|
|
|
| #include "platform/PlatformExport.h"
|
| #include "platform/audio/AudioDestinationConsumer.h"
|
| +#include "platform/heap/Handle.h"
|
| #include "public/platform/WebMediaConstraints.h"
|
| #include "wtf/OwnPtr.h"
|
| #include "wtf/PassOwnPtr.h"
|
| -#include "wtf/RefCounted.h"
|
| #include "wtf/ThreadingPrimitives.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| -class PLATFORM_EXPORT MediaStreamSource FINAL : public RefCounted<MediaStreamSource> {
|
| +class PLATFORM_EXPORT MediaStreamSource FINAL : public GarbageCollectedFinalized<MediaStreamSource> {
|
| public:
|
| - class Observer {
|
| + class Observer : public GarbageCollectedMixin {
|
| public:
|
| virtual ~Observer() { }
|
| virtual void sourceChangedState() = 0;
|
| + virtual void trace(Visitor*) { }
|
| };
|
|
|
| class ExtraData {
|
| @@ -68,7 +69,7 @@ public:
|
| ReadyStateEnded = 2
|
| };
|
|
|
| - static PassRefPtr<MediaStreamSource> create(const String& id, Type, const String& name, ReadyState = ReadyStateLive, bool requiresConsumer = false);
|
| + static MediaStreamSource* create(const String& id, Type, const String& name, ReadyState = ReadyStateLive, bool requiresConsumer = false);
|
|
|
| const String& id() const { return m_id; }
|
| Type type() const { return m_type; }
|
| @@ -94,6 +95,8 @@ public:
|
| bool removeAudioConsumer(AudioDestinationConsumer*);
|
| const Vector<RefPtr<AudioDestinationConsumer> >& audioConsumers() { return m_audioConsumers; }
|
|
|
| + void trace(Visitor*);
|
| +
|
| private:
|
| MediaStreamSource(const String& id, Type, const String& name, ReadyState, bool requiresConsumer);
|
|
|
| @@ -102,14 +105,14 @@ private:
|
| String m_name;
|
| ReadyState m_readyState;
|
| bool m_requiresConsumer;
|
| - Vector<Observer*> m_observers;
|
| + HeapHashSet<WeakMember<Observer> > m_observers;
|
| Mutex m_audioConsumersLock;
|
| Vector<RefPtr<AudioDestinationConsumer> > m_audioConsumers;
|
| OwnPtr<ExtraData> m_extraData;
|
| blink::WebMediaConstraints m_constraints;
|
| };
|
|
|
| -typedef Vector<RefPtr<MediaStreamSource> > MediaStreamSourceVector;
|
| +typedef HeapVector<Member<MediaStreamSource> > MediaStreamSourceVector;
|
|
|
| } // namespace blink
|
|
|
|
|