Chromium Code Reviews| Index: webkit/media/webinbandtexttrack_impl.cc |
| diff --git a/webkit/media/webinbandtexttrack_impl.cc b/webkit/media/webinbandtexttrack_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..414225a368cb1e94c995cd0ffdccdfc066e71ee4 |
| --- /dev/null |
| +++ b/webkit/media/webinbandtexttrack_impl.cc |
| @@ -0,0 +1,72 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "webkit/media/webinbandtexttrack_impl.h" |
| + |
| +namespace webkit_media { |
| + |
| +WebInbandTextTrackImpl::WebInbandTextTrackImpl( |
| + Kind kind, |
| + const WebKit::WebString& label, |
| + const WebKit::WebString& language) |
| + : client_(NULL), |
| + mode_(Disabled), |
| + kind_(kind), |
| + label_(label), |
| + language_(language) { |
| +} |
| + |
| +WebInbandTextTrackImpl::~WebInbandTextTrackImpl() { |
| +} |
|
acolwell GONE FROM CHROMIUM
2013/04/05 16:29:23
Add DCHECK(!client_); and make sure that the WebKi
Matthew Heaney (Chromium)
2013/05/09 03:53:11
Done.
|
| + |
| +void WebInbandTextTrackImpl::setClient( |
| + WebKit::WebInbandTextTrackClient* client) { |
| + client_ = client; |
| +} |
| + |
| +WebKit::WebInbandTextTrackClient* WebInbandTextTrackImpl::client() { |
| + return client_; |
| +} |
| + |
| +void WebInbandTextTrackImpl::setMode(Mode mode) { |
| + mode_ = mode; |
| +} |
| + |
| +WebInbandTextTrackImpl::Mode WebInbandTextTrackImpl::mode() const { |
| + return mode_; |
| +} |
| + |
| +WebInbandTextTrackImpl::Kind WebInbandTextTrackImpl::kind() const { |
| + return kind_; |
| +} |
| + |
| +bool WebInbandTextTrackImpl::isClosedCaptions() const { |
| + switch (kind_) { |
| + case Captions: |
| + case Subtitles: |
| + return true; |
| + |
| + default: |
| + return false; |
| + } |
| +} |
| + |
| +WebKit::WebString WebInbandTextTrackImpl::label() const { |
| + return label_; |
| +} |
| + |
| +WebKit::WebString WebInbandTextTrackImpl::language() const { |
| + return language_; |
| +} |
| + |
| +bool WebInbandTextTrackImpl::isDefault() const { |
| + return false; |
| +} |
| + |
| +int WebInbandTextTrackImpl::textTrackIndex() const { |
| + // TODO(matthewjheaney): What is correct value here? |
| + return 0; |
|
acolwell GONE FROM CHROMIUM
2013/04/05 16:29:23
This appears to be an index for the track order in
Matthew Heaney (Chromium)
2013/05/09 03:53:11
Done.
|
| +} |
| + |
| +} // namespace webkit_media |