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

Unified Diff: Source/core/html/track/TextTrack.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/TextTrack.h
diff --git a/Source/core/html/track/TextTrack.h b/Source/core/html/track/TextTrack.h
index 6e9d743ae247109dbaee87b7c724cb05e8f0b83a..fd572558174b5aa8e0794818f33cc5ae4f34b09f 100644
--- a/Source/core/html/track/TextTrack.h
+++ b/Source/core/html/track/TextTrack.h
@@ -30,6 +30,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/events/EventTarget.h"
#include "core/html/track/TrackBase.h"
+#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -45,11 +46,11 @@ class VTTRegion;
class VTTRegionList;
class TextTrack : public TrackBase, public ScriptWrappable, public EventTargetWithInlineData {
- REFCOUNTED_EVENT_TARGET(TrackBase);
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<TrackBase>);
public:
- static PassRefPtr<TextTrack> create(Document& document, const AtomicString& kind, const AtomicString& label, const AtomicString& language)
+ static PassRefPtrWillBeRawPtr<TextTrack> create(Document& document, const AtomicString& kind, const AtomicString& label, const AtomicString& language)
{
- return adoptRef(new TextTrack(document, kind, label, language, emptyAtom, AddTrack));
+ return adoptRefWillBeRefCountedGarbageCollected(new TextTrack(document, kind, label, language, emptyAtom, AddTrack));
}
virtual ~TextTrack();
@@ -79,13 +80,13 @@ public:
TextTrackCueList* cues();
TextTrackCueList* activeCues() const;
- HTMLMediaElement* mediaElement();
+ HTMLMediaElement* mediaElement() const;
- void addCue(PassRefPtr<TextTrackCue>);
+ void addCue(PassRefPtrWillBeRawPtr<TextTrackCue>);
void removeCue(TextTrackCue*, ExceptionState&);
VTTRegionList* regions();
- void addRegion(PassRefPtr<VTTRegion>);
+ void addRegion(PassRefPtrWillBeRawPtr<VTTRegion>);
void removeRegion(VTTRegion*, ExceptionState&);
void cueWillChange(TextTrackCue*);
@@ -110,30 +111,27 @@ public:
void removeAllCues();
- Document& document() const { return *m_document; }
-
// EventTarget methods
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual ExecutionContext* executionContext() const OVERRIDE;
+ virtual void trace(Visitor*) OVERRIDE;
+
protected:
TextTrack(Document&, const AtomicString& kind, const AtomicString& label, const AtomicString& language, const AtomicString& id, TextTrackType);
virtual bool isValidKind(const AtomicString& kind) const OVERRIDE { return isValidKindKeyword(kind); }
virtual AtomicString defaultKind() const OVERRIDE { return subtitlesKeyword(); }
- RefPtr<TextTrackCueList> m_cues;
+ RefPtrWillBeMember<TextTrackCueList> m_cues;
private:
VTTRegionList* ensureVTTRegionList();
- RefPtr<VTTRegionList> m_regions;
+ RefPtrWillBeMember<VTTRegionList> m_regions;
TextTrackCueList* ensureTextTrackCueList();
- // FIXME: Remove this pointer and get the Document from m_client
- Document* m_document;
-
- TextTrackList* m_trackList;
+ RawPtrWillBeMember<TextTrackList> m_trackList;
AtomicString m_mode;
TextTrackType m_trackType;
ReadinessState m_readinessState;

Powered by Google App Engine
This is Rietveld 408576698