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

Side by Side Diff: webkit/media/webinbandtexttrack_impl.cc

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporated Frank's comments Created 7 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/media/webinbandtexttrack_impl.h"
6
7 namespace webkit_media {
8
9 WebInbandTextTrackImpl::WebInbandTextTrackImpl(
10 Kind kind,
11 const WebKit::WebString& label,
12 const WebKit::WebString& language)
13 : client_(NULL),
14 mode_(Disabled),
15 kind_(kind),
16 label_(label),
17 language_(language) {
18 }
19
20 WebInbandTextTrackImpl::~WebInbandTextTrackImpl() {
21 }
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.
22
23 void WebInbandTextTrackImpl::setClient(
24 WebKit::WebInbandTextTrackClient* client) {
25 client_ = client;
26 }
27
28 WebKit::WebInbandTextTrackClient* WebInbandTextTrackImpl::client() {
29 return client_;
30 }
31
32 void WebInbandTextTrackImpl::setMode(Mode mode) {
33 mode_ = mode;
34 }
35
36 WebInbandTextTrackImpl::Mode WebInbandTextTrackImpl::mode() const {
37 return mode_;
38 }
39
40 WebInbandTextTrackImpl::Kind WebInbandTextTrackImpl::kind() const {
41 return kind_;
42 }
43
44 bool WebInbandTextTrackImpl::isClosedCaptions() const {
45 switch (kind_) {
46 case Captions:
47 case Subtitles:
48 return true;
49
50 default:
51 return false;
52 }
53 }
54
55 WebKit::WebString WebInbandTextTrackImpl::label() const {
56 return label_;
57 }
58
59 WebKit::WebString WebInbandTextTrackImpl::language() const {
60 return language_;
61 }
62
63 bool WebInbandTextTrackImpl::isDefault() const {
64 return false;
65 }
66
67 int WebInbandTextTrackImpl::textTrackIndex() const {
68 // TODO(matthewjheaney): What is correct value here?
69 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.
70 }
71
72 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698