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

Side by Side Diff: Source/core/html/track/LoadableTextTrack.cpp

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // origin of the media element's Document, and the default origin behaviour set to fail. 112 // origin of the media element's Document, and the default origin behaviour set to fail.
113 m_loader = TextTrackLoader::create(*this, m_trackElement->document()); 113 m_loader = TextTrackLoader::create(*this, m_trackElement->document());
114 if (!m_loader->load(m_url, m_trackElement->mediaElementCrossOriginAttribute( ))) 114 if (!m_loader->load(m_url, m_trackElement->mediaElementCrossOriginAttribute( )))
115 m_trackElement->didCompleteLoad(HTMLTrackElement::Failure); 115 m_trackElement->didCompleteLoad(HTMLTrackElement::Failure);
116 } 116 }
117 117
118 void LoadableTextTrack::newCuesAvailable(TextTrackLoader* loader) 118 void LoadableTextTrack::newCuesAvailable(TextTrackLoader* loader)
119 { 119 {
120 ASSERT_UNUSED(loader, m_loader == loader); 120 ASSERT_UNUSED(loader, m_loader == loader);
121 121
122 WillBeHeapVector<RefPtrWillBeMember<VTTCue> > newCues; 122 WillBeHeapVector<RefPtrWillBeMember<VTTCue>> newCues;
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
(...skipping 10 matching lines...) Expand all
143 return; 143 return;
144 #endif 144 #endif
145 145
146 m_trackElement->didCompleteLoad(loadingFailed ? HTMLTrackElement::Failure : HTMLTrackElement::Success); 146 m_trackElement->didCompleteLoad(loadingFailed ? HTMLTrackElement::Failure : HTMLTrackElement::Success);
147 } 147 }
148 148
149 void LoadableTextTrack::newRegionsAvailable(TextTrackLoader* loader) 149 void LoadableTextTrack::newRegionsAvailable(TextTrackLoader* loader)
150 { 150 {
151 ASSERT_UNUSED(loader, m_loader == loader); 151 ASSERT_UNUSED(loader, m_loader == loader);
152 152
153 WillBeHeapVector<RefPtrWillBeMember<VTTRegion> > newRegions; 153 WillBeHeapVector<RefPtrWillBeMember<VTTRegion>> newRegions;
154 m_loader->getNewRegions(newRegions); 154 m_loader->getNewRegions(newRegions);
155 155
156 for (size_t i = 0; i < newRegions.size(); ++i) { 156 for (size_t i = 0; i < newRegions.size(); ++i) {
157 newRegions[i]->setTrack(this); 157 newRegions[i]->setTrack(this);
158 regions()->add(newRegions[i]); 158 regions()->add(newRegions[i]);
159 } 159 }
160 } 160 }
161 161
162 size_t LoadableTextTrack::trackElementIndex() 162 size_t LoadableTextTrack::trackElementIndex()
163 { 163 {
(...skipping 14 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElementTypes.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698