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

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

Issue 284513003: Implement AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move blink::WebTrackId to blink::WebMediaPlayer::TrackId Created 6 years, 7 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.cpp
diff --git a/Source/core/html/track/TrackBase.cpp b/Source/core/html/track/TrackBase.cpp
index a11c065f41080f3d1d9d5b8d9e5b8b5c4a43105d..93815b128052b7ab46164216eadee5ff15b6ec37 100644
--- a/Source/core/html/track/TrackBase.cpp
+++ b/Source/core/html/track/TrackBase.cpp
@@ -33,16 +33,25 @@
namespace WebCore {
-TrackBase::TrackBase(Type type, const AtomicString& label, const AtomicString& language, const AtomicString& id)
- : m_type(type)
+static blink::WebMediaPlayer::TrackId nextTrackId()
+{
+ static blink::WebMediaPlayer::TrackId next = 0;
+ return ++next;
+}
+
+TrackBase::TrackBase(Type type, const AtomicString& label, const AtomicString& language, const String& id)
+ : m_trackId(nextTrackId())
+ , m_type(type)
, m_label(label)
, m_language(language)
, m_id(id)
+ , m_mediaElement(0)
{
}
TrackBase::~TrackBase()
{
+ ASSERT(!m_mediaElement);
haraken 2014/06/03 05:48:29 You cannot check this in oilpan builds, because no
philipj_slow 2014/06/11 10:03:48 Done.
}
void TrackBase::setKind(const AtomicString& kind)
@@ -54,4 +63,3 @@ void TrackBase::setKind(const AtomicString& kind)
}
} // namespace WebCore
-

Powered by Google App Engine
This is Rietveld 408576698