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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 m_loader->getNewCues(newCues); | 123 m_loader->getNewCues(newCues); |
124 | 124 |
125 if (!m_cues) | 125 if (!m_cues) |
126 m_cues = TextTrackCueList::create(); | 126 m_cues = TextTrackCueList::create(); |
127 | 127 |
128 for (size_t i = 0; i < newCues.size(); ++i) { | 128 for (size_t i = 0; i < newCues.size(); ++i) { |
129 newCues[i]->setTrack(this); | 129 newCues[i]->setTrack(this); |
130 m_cues->add(newCues[i].release()); | 130 m_cues->add(newCues[i].release()); |
131 } | 131 } |
132 | 132 |
133 if (mediaElement()) | 133 if (mediaElement() && mode() != disabledKeyword()) |
134 mediaElement()->textTrackAddCues(this, m_cues.get()); | 134 mediaElement()->textTrackAddCues(this, m_cues.get()); |
135 } | 135 } |
136 | 136 |
137 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin
gFailed) | 137 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin
gFailed) |
138 { | 138 { |
139 ASSERT_UNUSED(loader, m_loader == loader); | 139 ASSERT_UNUSED(loader, m_loader == loader); |
140 | 140 |
141 #if !ENABLE(OILPAN) | 141 #if !ENABLE(OILPAN) |
142 if (!m_trackElement) | 142 if (!m_trackElement) |
143 return; | 143 return; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 | 179 |
180 void LoadableTextTrack::trace(Visitor* visitor) | 180 void LoadableTextTrack::trace(Visitor* visitor) |
181 { | 181 { |
182 visitor->trace(m_trackElement); | 182 visitor->trace(m_trackElement); |
183 visitor->trace(m_loader); | 183 visitor->trace(m_loader); |
184 TextTrack::trace(visitor); | 184 TextTrack::trace(visitor); |
185 } | 185 } |
186 | 186 |
187 } // namespace blink | 187 } // namespace blink |
OLD | NEW |