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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 months 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/mediastream/MediaDevices.h" 5 #include "modules/mediastream/MediaDevices.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 void MediaDevices::suspend() { 191 void MediaDevices::suspend() {
192 m_dispatchScheduledEventRunner->suspend(); 192 m_dispatchScheduledEventRunner->suspend();
193 } 193 }
194 194
195 void MediaDevices::resume() { 195 void MediaDevices::resume() {
196 m_dispatchScheduledEventRunner->resume(); 196 m_dispatchScheduledEventRunner->resume();
197 } 197 }
198 198
199 void MediaDevices::scheduleDispatchEvent(Event* event) { 199 void MediaDevices::scheduleDispatchEvent(Event* event) {
200 m_scheduledEvents.append(event); 200 m_scheduledEvents.push_back(event);
201 m_dispatchScheduledEventRunner->runAsync(); 201 m_dispatchScheduledEventRunner->runAsync();
202 } 202 }
203 203
204 void MediaDevices::dispatchScheduledEvent() { 204 void MediaDevices::dispatchScheduledEvent() {
205 HeapVector<Member<Event>> events; 205 HeapVector<Member<Event>> events;
206 events.swap(m_scheduledEvents); 206 events.swap(m_scheduledEvents);
207 207
208 for (const auto& event : events) 208 for (const auto& event : events)
209 dispatchEvent(event); 209 dispatchEvent(event);
210 } 210 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 DEFINE_TRACE(MediaDevices) { 248 DEFINE_TRACE(MediaDevices) {
249 visitor->trace(m_dispatchScheduledEventRunner); 249 visitor->trace(m_dispatchScheduledEventRunner);
250 visitor->trace(m_scheduledEvents); 250 visitor->trace(m_scheduledEvents);
251 EventTargetWithInlineData::trace(visitor); 251 EventTargetWithInlineData::trace(visitor);
252 SuspendableObject::trace(visitor); 252 SuspendableObject::trace(visitor);
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698