Apply FINAL to the Node hierarchy.
[WebKit.git] / Source / WebCore / html / HTMLTrackElement.h
index c9ee853..480bb43 100644 (file)
 #define HTMLTrackElement_h
 
 #if ENABLE(VIDEO_TRACK)
-
 #include "HTMLElement.h"
 #include "LoadableTextTrack.h"
+#include "TextTrack.h"
 
 namespace WebCore {
 
 class HTMLMediaElement;
 
-class HTMLTrackElement : public HTMLElement, public TextTrackClient {
+class HTMLTrackElement FINAL : public HTMLElement, public TextTrackClient {
 public:
     static PassRefPtr<HTMLTrackElement> create(const QualifiedName&, Document*);
 
@@ -53,28 +53,32 @@ public:
 
     bool isDefault() const;
     void setIsDefault(bool);
-    
+
     enum ReadyState { NONE = 0, LOADING = 1, LOADED = 2, TRACK_ERROR = 3 };
-    ReadyState readyState() const { return m_readyState; }
+    ReadyState readyState();
+    void setReadyState(ReadyState);
 
     TextTrack* track();
-    
+
     void scheduleLoad();
-    virtual bool canLoadUrl(LoadableTextTrack*, const KURL&);
-    virtual void didCompleteLoad(LoadableTextTrack*, bool /* loadingFailed */);
-    
-    void setReadyState(ReadyState);
+
+    enum LoadStatus { Failure, Success };
+    virtual void didCompleteLoad(LoadableTextTrack*, LoadStatus);
+
+    const AtomicString& mediaElementCrossOriginAttribute() const;
 
 private:
     HTMLTrackElement(const QualifiedName&, Document*);
     virtual ~HTMLTrackElement();
 
-    virtual void parseMappedAttribute(Attribute*);
-    virtual void attributeChanged(Attribute*, bool preserveDecls);
+    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
+
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
-    virtual void insertedIntoTree(bool);
-    virtual void willRemove();
-    virtual bool isURLAttribute(Attribute*) const;
+    void loadTimerFired(Timer<HTMLTrackElement>*);
 
 #if ENABLE(MICRODATA)
     virtual String itemValueText() const OVERRIDE;
@@ -92,9 +96,10 @@ private:
     virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>);
 
     LoadableTextTrack* ensureTrack();
+    virtual bool canLoadUrl(const KURL&);
 
-    HTMLTrackElement::ReadyState m_readyState;
     RefPtr<LoadableTextTrack> m_track;
+    Timer<HTMLTrackElement> m_loadTimer;
 };
 
 }