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

Unified Diff: Source/platform/mediastream/MediaStreamSource.h

Issue 534473002: Revert of Oilpan: Move MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/mediastream/MediaStreamSource.h
diff --git a/Source/platform/mediastream/MediaStreamSource.h b/Source/platform/mediastream/MediaStreamSource.h
index 01dc653ff8e475228e1ff6242b730946c7290cfd..cc24cdc7ccd1c84f9de16e413f14ba78d00230bd 100644
--- a/Source/platform/mediastream/MediaStreamSource.h
+++ b/Source/platform/mediastream/MediaStreamSource.h
@@ -34,23 +34,22 @@
#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 GarbageCollectedFinalized<MediaStreamSource> {
+class PLATFORM_EXPORT MediaStreamSource FINAL : public RefCounted<MediaStreamSource> {
public:
- class Observer : public GarbageCollectedMixin {
+ class Observer {
public:
virtual ~Observer() { }
virtual void sourceChangedState() = 0;
- virtual void trace(Visitor*) { }
};
class ExtraData {
@@ -69,7 +68,7 @@
ReadyStateEnded = 2
};
- static MediaStreamSource* create(const String& id, Type, const String& name, ReadyState = ReadyStateLive, bool requiresConsumer = false);
+ static PassRefPtr<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; }
@@ -95,8 +94,6 @@
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);
@@ -105,14 +102,14 @@
String m_name;
ReadyState m_readyState;
bool m_requiresConsumer;
- HeapHashSet<WeakMember<Observer> > m_observers;
+ Vector<Observer*> m_observers;
Mutex m_audioConsumersLock;
Vector<RefPtr<AudioDestinationConsumer> > m_audioConsumers;
OwnPtr<ExtraData> m_extraData;
blink::WebMediaConstraints m_constraints;
};
-typedef HeapVector<Member<MediaStreamSource> > MediaStreamSourceVector;
+typedef Vector<RefPtr<MediaStreamSource> > MediaStreamSourceVector;
} // namespace blink
« no previous file with comments | « Source/platform/mediastream/MediaStreamDescriptor.cpp ('k') | Source/platform/mediastream/MediaStreamSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698