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

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

Issue 1363143003: [Oilpan] Move MediaStream{Source|Component|Descriptor} to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work for comments Created 5 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: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
index a7ab84147b152911bbaa6a7bd8268373cde98a62..4293d9baaa72de492421cbf0ed32da4e5022ac7a 100644
--- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
+++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
@@ -44,9 +44,9 @@
namespace blink {
-class PLATFORM_EXPORT MediaStreamSource final : public RefCounted<MediaStreamSource> {
+class PLATFORM_EXPORT MediaStreamSource final : public GarbageCollectedFinalized<MediaStreamSource> {
public:
- class PLATFORM_EXPORT Observer {
+ class PLATFORM_EXPORT Observer : public WillBeGarbageCollectedMixin {
public:
virtual ~Observer() { }
virtual void sourceChangedState() = 0;
@@ -68,7 +68,7 @@ public:
ReadyStateEnded = 2
};
- static PassRefPtr<MediaStreamSource> create(const String& id, Type, const String& name, bool remote, bool readonly, ReadyState = ReadyStateLive, bool requiresConsumer = false);
+ static MediaStreamSource* create(const String& id, Type, const String& name, bool remote, bool readonly, ReadyState = ReadyStateLive, bool requiresConsumer = false);
const String& id() const { return m_id; }
Type type() const { return m_type; }
@@ -96,6 +96,8 @@ public:
bool removeAudioConsumer(AudioDestinationConsumer*);
const HeapHashSet<Member<AudioDestinationConsumer>>& audioConsumers() { return m_audioConsumers; }
+ DECLARE_TRACE();
+
private:
MediaStreamSource(const String& id, Type, const String& name, bool remote, bool readonly, ReadyState, bool requiresConsumer);
@@ -106,14 +108,14 @@ private:
bool m_readonly;
ReadyState m_readyState;
bool m_requiresConsumer;
- Vector<Observer*> m_observers;
+ WillBeHeapVector<RawPtrWillBeMember<Observer>> m_observers;
sof 2015/09/30 07:54:27 Can't this be HeapVector<Member<Observer>> ?
peria 2015/09/30 08:16:03 Done. Oops, it must be. It figures RefCountedGarba
Mutex m_audioConsumersLock;
- PersistentHeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers;
+ HeapHashSet<Member<AudioDestinationConsumer>> m_audioConsumers;
OwnPtr<ExtraData> m_extraData;
WebMediaConstraints m_constraints;
};
-typedef Vector<RefPtr<MediaStreamSource>> MediaStreamSourceVector;
+typedef HeapVector<Member<MediaStreamSource>> MediaStreamSourceVector;
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698