Index: Source/core/html/track/InbandTextTrack.cpp |
diff --git a/Source/core/html/track/InbandTextTrack.cpp b/Source/core/html/track/InbandTextTrack.cpp |
index d2aa99a0d9c0d005af6caec132366c40b5c92131..f507a30ce3baa6242cec396b9855f356b318e6f8 100644 |
--- a/Source/core/html/track/InbandTextTrack.cpp |
+++ b/Source/core/html/track/InbandTextTrack.cpp |
@@ -29,40 +29,44 @@ |
#include "bindings/v8/ExceptionStatePlaceholder.h" |
#include "core/html/track/TextTrackCue.h" |
#include "platform/Logging.h" |
-#include "platform/graphics/media/InbandTextTrackPrivate.h" |
+#include "public/platform/WebInbandTextTrack.h" |
+#include "public/platform/WebString.h" |
#include "wtf/UnusedParam.h" |
#include <math.h> |
+using blink::WebInbandTextTrack; |
+using blink::WebString; |
+ |
namespace WebCore { |
-PassRefPtr<InbandTextTrack> InbandTextTrack::create(Document& document, TextTrackClient* client, PassRefPtr<InbandTextTrackPrivate> playerPrivate) |
+PassRefPtr<InbandTextTrack> InbandTextTrack::create(Document& document, TextTrackClient* client, WebInbandTextTrack* webTrack) |
{ |
- return adoptRef(new InbandTextTrack(document, client, playerPrivate)); |
+ return adoptRef(new InbandTextTrack(document, client, webTrack)); |
} |
-InbandTextTrack::InbandTextTrack(Document& document, TextTrackClient* client, PassRefPtr<InbandTextTrackPrivate> tracksPrivate) |
- : TextTrack(document, client, emptyAtom, tracksPrivate->label(), tracksPrivate->language(), InBand) |
- , m_private(tracksPrivate) |
+InbandTextTrack::InbandTextTrack(Document& document, TextTrackClient* client, WebInbandTextTrack* webTrack) |
+ : TextTrack(document, client, emptyAtom, webTrack->label(), webTrack->language(), InBand) |
+ , m_webTrack(webTrack) |
{ |
- m_private->setClient(this); |
+ m_webTrack->setClient(this); |
- switch (m_private->kind()) { |
- case InbandTextTrackPrivate::Subtitles: |
+ switch (m_webTrack->kind()) { |
+ case WebInbandTextTrack::KindSubtitles: |
setKind(TextTrack::subtitlesKeyword()); |
break; |
- case InbandTextTrackPrivate::Captions: |
+ case WebInbandTextTrack::KindCaptions: |
setKind(TextTrack::captionsKeyword()); |
break; |
- case InbandTextTrackPrivate::Descriptions: |
+ case WebInbandTextTrack::KindDescriptions: |
setKind(TextTrack::descriptionsKeyword()); |
break; |
- case InbandTextTrackPrivate::Chapters: |
+ case WebInbandTextTrack::KindChapters: |
setKind(TextTrack::chaptersKeyword()); |
break; |
- case InbandTextTrackPrivate::Metadata: |
+ case WebInbandTextTrack::KindMetadata: |
setKind(TextTrack::metadataKeyword()); |
break; |
- case InbandTextTrackPrivate::None: |
+ case WebInbandTextTrack::KindNone: |
default: |
ASSERT_NOT_REACHED(); |
break; |
@@ -71,28 +75,26 @@ InbandTextTrack::InbandTextTrack(Document& document, TextTrackClient* client, Pa |
InbandTextTrack::~InbandTextTrack() |
{ |
- // Make sure m_private was cleared by trackRemoved() before destruction. |
- ASSERT(!m_private); |
+ // Make sure m_webTrack was cleared by trackRemoved() before destruction. |
+ ASSERT(!m_webTrack); |
} |
size_t InbandTextTrack::inbandTrackIndex() |
{ |
- ASSERT(m_private); |
- return m_private->textTrackIndex(); |
+ ASSERT(m_webTrack); |
+ return m_webTrack->textTrackIndex(); |
} |
void InbandTextTrack::trackRemoved() |
{ |
- ASSERT(m_private); |
- m_private->setClient(0); |
- m_private = 0; |
+ ASSERT(m_webTrack); |
+ m_webTrack->setClient(0); |
+ m_webTrack = 0; |
clearClient(); |
} |
-void InbandTextTrack::addWebVTTCue(InbandTextTrackPrivate* trackPrivate, double start, double end, const String& id, const String& content, const String& settings) |
+void InbandTextTrack::addWebVTTCue(double start, double end, const WebString& id, const WebString& content, const WebString& settings) |
{ |
- ASSERT_UNUSED(trackPrivate, trackPrivate == m_private); |
- |
RefPtr<TextTrackCue> cue = TextTrackCue::create(document(), start, end, content); |
cue->setId(id); |
cue->setCueSettings(settings); |