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

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

Issue 170233009: Initial implementation of AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@blink-master
Patch Set: Addressed IDL comments. Created 6 years, 9 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/TrackBase.h
diff --git a/Source/core/html/track/TrackBase.h b/Source/core/html/track/TrackBase.h
index b291c68db363fd0a7b2e59c5c97e2c86a39aa651..df5d41e286fc423097d8482781d08a8e1734fad2 100644
--- a/Source/core/html/track/TrackBase.h
+++ b/Source/core/html/track/TrackBase.h
@@ -31,6 +31,8 @@
namespace WebCore {
+class HTMLMediaElement;
+
class TrackBase : public RefCounted<TrackBase> {
public:
virtual ~TrackBase();
@@ -47,11 +49,14 @@ 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; }
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;
@@ -61,7 +66,8 @@ private:
AtomicString m_kind;
AtomicString m_label;
AtomicString m_language;
- AtomicString m_id;
+ String m_id;
+ HTMLMediaElement* m_mediaElement;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698