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

Unified Diff: Source/core/html/track/TextTrackList.h

Issue 244493002: Oilpan: add transition types to track interface objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Explicitly dispose of TextTrackList + fix handling of {Inband,Loadable}TextTrack Created 6 years, 8 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/core/html/track/TextTrackList.h
diff --git a/Source/core/html/track/TextTrackList.h b/Source/core/html/track/TextTrackList.h
index bc70584e39e576c5a437b89ffbea9c9206d14bcd..5f20170fe27378c03ef4d0986d88a1b5e4f1912d 100644
--- a/Source/core/html/track/TextTrackList.h
+++ b/Source/core/html/track/TextTrackList.h
@@ -31,6 +31,7 @@
#include "core/events/EventTarget.h"
#include "core/html/HTMLMediaElement.h"
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
@@ -40,14 +41,15 @@ namespace WebCore {
class GenericEventQueue;
class TextTrack;
-class TextTrackList FINAL : public RefCounted<TextTrackList>, public ScriptWrappable, public EventTargetWithInlineData {
- REFCOUNTED_EVENT_TARGET(TextTrackList);
+class TextTrackList FINAL : public RefCountedWillBeRefCountedGarbageCollected<TextTrackList>, public ScriptWrappable, public EventTargetWithInlineData {
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<TextTrackList>);
public:
- static PassRefPtr<TextTrackList> create(HTMLMediaElement* owner)
+ static PassRefPtrWillBeRawPtr<TextTrackList> create(HTMLMediaElement* owner)
{
- return adoptRef(new TextTrackList(owner));
+ return adoptRefWillBeRefCountedGarbageCollected(new TextTrackList(owner));
}
virtual ~TextTrackList();
+ void dispose();
unsigned length() const;
int getTrackIndex(TextTrack*);
@@ -56,7 +58,7 @@ public:
TextTrack* item(unsigned index);
TextTrack* getTrackById(const AtomicString& id);
- void append(PassRefPtr<TextTrack>);
+ void append(PassRefPtrWillBeRawPtr<TextTrack>);
void remove(TextTrack*);
// EventTarget
@@ -73,13 +75,15 @@ public:
void scheduleChangeEvent();
void removeAllInbandTracks();
+ void trace(Visitor*);
+
private:
explicit TextTrackList(HTMLMediaElement*);
- void scheduleTrackEvent(const AtomicString& eventName, PassRefPtr<TextTrack>);
+ void scheduleTrackEvent(const AtomicString& eventName, PassRefPtrWillBeRawPtr<TextTrack>);
- void scheduleAddTrackEvent(PassRefPtr<TextTrack>);
- void scheduleRemoveTrackEvent(PassRefPtr<TextTrack>);
+ void scheduleAddTrackEvent(PassRefPtrWillBeRawPtr<TextTrack>);
+ void scheduleRemoveTrackEvent(PassRefPtrWillBeRawPtr<TextTrack>);
void invalidateTrackIndexesAfterTrack(TextTrack*);
@@ -87,9 +91,9 @@ private:
OwnPtr<GenericEventQueue> m_asyncEventQueue;
- Vector<RefPtr<TextTrack> > m_addTrackTracks;
- Vector<RefPtr<TextTrack> > m_elementTracks;
- Vector<RefPtr<TextTrack> > m_inbandTracks;
+ WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_addTrackTracks;
+ WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_elementTracks;
+ WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_inbandTracks;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698