| Index: third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp b/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp
|
| index ebc5f73ad3836605a5ece0ba6ecb185807c26c94..78cb2b7acb87945e1617735e8350e11fa85c25b1 100644
|
| --- a/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp
|
| +++ b/third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp
|
| @@ -25,51 +25,51 @@
|
|
|
| #include "core/html/track/InbandTextTrack.h"
|
|
|
| -#include "bindings/core/v8/ExceptionStatePlaceholder.h"
|
| #include "core/html/HTMLMediaElement.h"
|
| #include "core/html/track/vtt/VTTCue.h"
|
| -#include "platform/Logging.h"
|
| #include "public/platform/WebInbandTextTrack.h"
|
| #include "public/platform/WebString.h"
|
| -#include <math.h>
|
|
|
| using blink::WebInbandTextTrack;
|
| using blink::WebString;
|
|
|
| namespace blink {
|
|
|
| -InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack)
|
| -{
|
| - return new InbandTextTrack(webTrack);
|
| -}
|
| +namespace {
|
|
|
| -InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack)
|
| - : TextTrack(subtitlesKeyword(), webTrack->label(), webTrack->language(), webTrack->id(), InBand)
|
| - , m_webTrack(webTrack)
|
| +const AtomicString& textTrackKindToString(WebInbandTextTrack::Kind kind)
|
| {
|
| - m_webTrack->setClient(this);
|
| -
|
| - switch (m_webTrack->kind()) {
|
| + switch (kind) {
|
| case WebInbandTextTrack::KindSubtitles:
|
| - setKind(TextTrack::subtitlesKeyword());
|
| - break;
|
| + return TextTrack::subtitlesKeyword();
|
| case WebInbandTextTrack::KindCaptions:
|
| - setKind(TextTrack::captionsKeyword());
|
| - break;
|
| + return TextTrack::captionsKeyword();
|
| case WebInbandTextTrack::KindDescriptions:
|
| - setKind(TextTrack::descriptionsKeyword());
|
| - break;
|
| + return TextTrack::descriptionsKeyword();
|
| case WebInbandTextTrack::KindChapters:
|
| - setKind(TextTrack::chaptersKeyword());
|
| - break;
|
| + return TextTrack::chaptersKeyword();
|
| case WebInbandTextTrack::KindMetadata:
|
| - setKind(TextTrack::metadataKeyword());
|
| - break;
|
| + return TextTrack::metadataKeyword();
|
| case WebInbandTextTrack::KindNone:
|
| default:
|
| - ASSERT_NOT_REACHED();
|
| break;
|
| }
|
| + ASSERT_NOT_REACHED();
|
| + return TextTrack::subtitlesKeyword();
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack)
|
| +{
|
| + return new InbandTextTrack(webTrack);
|
| +}
|
| +
|
| +InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack)
|
| + : TextTrack(textTrackKindToString(webTrack->kind()), webTrack->label(), webTrack->language(), webTrack->id(), InBand)
|
| + , m_webTrack(webTrack)
|
| +{
|
| + m_webTrack->setClient(this);
|
| }
|
|
|
| InbandTextTrack::~InbandTextTrack()
|
|
|