OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 m_loader->getNewCues(newCues); | 101 m_loader->getNewCues(newCues); |
102 | 102 |
103 if (!m_cues) | 103 if (!m_cues) |
104 m_cues = TextTrackCueList::create(); | 104 m_cues = TextTrackCueList::create(); |
105 | 105 |
106 for (size_t i = 0; i < newCues.size(); ++i) { | 106 for (size_t i = 0; i < newCues.size(); ++i) { |
107 newCues[i]->setTrack(this); | 107 newCues[i]->setTrack(this); |
108 m_cues->add(newCues[i]); | 108 m_cues->add(newCues[i]); |
109 } | 109 } |
110 | 110 |
111 if (client()) | 111 if (mode() != TextTrack::disabledKeyword() && client()) |
112 client()->textTrackAddCues(this, m_cues.get()); | 112 client()->textTrackAddCues(this, m_cues.get()); |
113 } | 113 } |
114 | 114 |
115 void LoadableTextTrack::cueLoadingStarted(TextTrackLoader* loader) | 115 void LoadableTextTrack::cueLoadingStarted(TextTrackLoader* loader) |
116 { | 116 { |
117 ASSERT_UNUSED(loader, m_loader == loader); | 117 ASSERT_UNUSED(loader, m_loader == loader); |
118 } | 118 } |
119 | 119 |
120 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin
gFailed) | 120 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin
gFailed) |
121 { | 121 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 if (node == m_trackElement) | 154 if (node == m_trackElement) |
155 return index; | 155 return index; |
156 ++index; | 156 ++index; |
157 } | 157 } |
158 ASSERT_NOT_REACHED(); | 158 ASSERT_NOT_REACHED(); |
159 | 159 |
160 return 0; | 160 return 0; |
161 } | 161 } |
162 | 162 |
163 } // namespace WebCore | 163 } // namespace WebCore |
164 | |
OLD | NEW |