OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 26 matching lines...) Expand all Loading... |
37 using blink::WebString; | 37 using blink::WebString; |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack) | 41 InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack) |
42 { | 42 { |
43 return new InbandTextTrack(webTrack); | 43 return new InbandTextTrack(webTrack); |
44 } | 44 } |
45 | 45 |
46 InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack) | 46 InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack) |
47 : TextTrack(emptyAtom, webTrack->label(), webTrack->language(), webTrack->id
(), InBand) | 47 : TextTrack(subtitlesKeyword(), webTrack->label(), webTrack->language(), web
Track->id(), InBand) |
48 , m_webTrack(webTrack) | 48 , m_webTrack(webTrack) |
49 { | 49 { |
50 m_webTrack->setClient(this); | 50 m_webTrack->setClient(this); |
51 | 51 |
52 switch (m_webTrack->kind()) { | 52 switch (m_webTrack->kind()) { |
53 case WebInbandTextTrack::KindSubtitles: | 53 case WebInbandTextTrack::KindSubtitles: |
54 setKind(TextTrack::subtitlesKeyword()); | 54 setKind(TextTrack::subtitlesKeyword()); |
55 break; | 55 break; |
56 case WebInbandTextTrack::KindCaptions: | 56 case WebInbandTextTrack::KindCaptions: |
57 setKind(TextTrack::captionsKeyword()); | 57 setKind(TextTrack::captionsKeyword()); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 { | 93 { |
94 HTMLMediaElement* owner = mediaElement(); | 94 HTMLMediaElement* owner = mediaElement(); |
95 ASSERT(owner); | 95 ASSERT(owner); |
96 VTTCue* cue = VTTCue::create(owner->document(), start, end, content); | 96 VTTCue* cue = VTTCue::create(owner->document(), start, end, content); |
97 cue->setId(id); | 97 cue->setId(id); |
98 cue->parseSettings(settings); | 98 cue->parseSettings(settings); |
99 addCue(cue); | 99 addCue(cue); |
100 } | 100 } |
101 | 101 |
102 } // namespace blink | 102 } // namespace blink |
OLD | NEW |