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 23 matching lines...) Expand all Loading... |
34 #include <math.h> | 34 #include <math.h> |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 PassRefPtr<InbandTextTrack> InbandTextTrack::create(Document& document, TextTrac
kClient* client, PassRefPtr<InbandTextTrackPrivate> playerPrivate) | 38 PassRefPtr<InbandTextTrack> InbandTextTrack::create(Document& document, TextTrac
kClient* client, PassRefPtr<InbandTextTrackPrivate> playerPrivate) |
39 { | 39 { |
40 return adoptRef(new InbandTextTrack(document, client, playerPrivate)); | 40 return adoptRef(new InbandTextTrack(document, client, playerPrivate)); |
41 } | 41 } |
42 | 42 |
43 InbandTextTrack::InbandTextTrack(Document& document, TextTrackClient* client, Pa
ssRefPtr<InbandTextTrackPrivate> tracksPrivate) | 43 InbandTextTrack::InbandTextTrack(Document& document, TextTrackClient* client, Pa
ssRefPtr<InbandTextTrackPrivate> tracksPrivate) |
44 : TextTrack(document, client, emptyString(), tracksPrivate->label(), tracksP
rivate->language(), InBand) | 44 : TextTrack(document, client, emptyAtom, tracksPrivate->label(), tracksPriva
te->language(), InBand) |
45 , m_private(tracksPrivate) | 45 , m_private(tracksPrivate) |
46 { | 46 { |
47 m_private->setClient(this); | 47 m_private->setClient(this); |
48 | 48 |
49 switch (m_private->kind()) { | 49 switch (m_private->kind()) { |
50 case InbandTextTrackPrivate::Subtitles: | 50 case InbandTextTrackPrivate::Subtitles: |
51 setKind(TextTrack::subtitlesKeyword()); | 51 setKind(TextTrack::subtitlesKeyword()); |
52 break; | 52 break; |
53 case InbandTextTrackPrivate::Captions: | 53 case InbandTextTrackPrivate::Captions: |
54 setKind(TextTrack::captionsKeyword()); | 54 setKind(TextTrack::captionsKeyword()); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 cue->setId(id); | 114 cue->setId(id); |
115 cue->setCueSettings(settings); | 115 cue->setCueSettings(settings); |
116 | 116 |
117 if (hasCue(cue.get())) | 117 if (hasCue(cue.get())) |
118 return; | 118 return; |
119 | 119 |
120 addCue(cue); | 120 addCue(cue); |
121 } | 121 } |
122 | 122 |
123 } // namespace WebCore | 123 } // namespace WebCore |
OLD | NEW |