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

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

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 6 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
« no previous file with comments | « Source/core/html/track/AudioTrackList.idl ('k') | Source/core/html/track/TrackBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TrackBase.h
diff --git a/Source/core/html/track/TrackBase.h b/Source/core/html/track/TrackBase.h
index d3625f076e5d349e4e089b20a86f5ba9e4c8b9c5..cff2b8a65629d2fda6ebc844459645e93e79635d 100644
--- a/Source/core/html/track/TrackBase.h
+++ b/Source/core/html/track/TrackBase.h
@@ -27,15 +27,20 @@
#define TrackBase_h
#include "platform/heap/Handle.h"
+#include "public/platform/WebMediaPlayer.h"
#include "wtf/RefCounted.h"
#include "wtf/text/AtomicString.h"
namespace WebCore {
+class HTMLMediaElement;
+
class TrackBase : public RefCountedWillBeRefCountedGarbageCollected<TrackBase> {
public:
virtual ~TrackBase();
+ blink::WebMediaPlayer::TrackId trackId() const { return m_trackId; }
+
enum Type { TextTrack, AudioTrack, VideoTrack };
Type type() const { return m_type; }
@@ -48,23 +53,29 @@ public:
AtomicString language() const { return m_language; }
void setLanguage(const AtomicString& language) { m_language = language; }
- AtomicString id() const { return m_id; }
- void setId(const AtomicString& id) { m_id = id; }
+ String id() const { return m_id; }
+ void setId(const String& id) { m_id = id; }
+
+ void setMediaElement(HTMLMediaElement* mediaElement) { m_mediaElement = mediaElement; }
+ HTMLMediaElement* mediaElement() const { return m_mediaElement; }
+ Node* owner() const;
- virtual void trace(Visitor*) { }
+ virtual void trace(Visitor*);
protected:
- TrackBase(Type, const AtomicString& label, const AtomicString& language, const AtomicString& id);
+ TrackBase(Type, const AtomicString& label, const AtomicString& language, const String& id);
virtual bool isValidKind(const AtomicString&) const = 0;
virtual AtomicString defaultKind() const = 0;
private:
+ blink::WebMediaPlayer::TrackId m_trackId;
Type m_type;
AtomicString m_kind;
AtomicString m_label;
AtomicString m_language;
- AtomicString m_id;
+ String m_id;
+ RawPtrWillBeMember<HTMLMediaElement> m_mediaElement;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/track/AudioTrackList.idl ('k') | Source/core/html/track/TrackBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698