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

Side by Side Diff: third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp

Issue 2567913002: Rename ActiveDOMObject to SuspendableObject (Closed)
Patch Set: Created 4 years 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/mediarecorder/MediaRecorder.h" 5 #include "modules/mediarecorder/MediaRecorder.h"
6 6
7 #include "bindings/core/v8/Dictionary.h" 7 #include "bindings/core/v8/Dictionary.h"
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "core/fileapi/Blob.h" 9 #include "core/fileapi/Blob.h"
10 #include "core/inspector/ConsoleMessage.h" 10 #include "core/inspector/ConsoleMessage.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 recorder->suspendIfNeeded(); 154 recorder->suspendIfNeeded();
155 155
156 return recorder; 156 return recorder;
157 } 157 }
158 158
159 MediaRecorder::MediaRecorder(ExecutionContext* context, 159 MediaRecorder::MediaRecorder(ExecutionContext* context,
160 MediaStream* stream, 160 MediaStream* stream,
161 const MediaRecorderOptions& options, 161 const MediaRecorderOptions& options,
162 ExceptionState& exceptionState) 162 ExceptionState& exceptionState)
163 : ActiveScriptWrappable(this), 163 : ActiveScriptWrappable(this),
164 ActiveDOMObject(context), 164 SuspendableObject(context),
165 m_stream(stream), 165 m_stream(stream),
166 m_streamAmountOfTracks(stream->getTracks().size()), 166 m_streamAmountOfTracks(stream->getTracks().size()),
167 m_mimeType(options.hasMimeType() ? options.mimeType() : kDefaultMimeType), 167 m_mimeType(options.hasMimeType() ? options.mimeType() : kDefaultMimeType),
168 m_stopped(true), 168 m_stopped(true),
169 m_ignoreMutedMedia(true), 169 m_ignoreMutedMedia(true),
170 m_audioBitsPerSecond(0), 170 m_audioBitsPerSecond(0),
171 m_videoBitsPerSecond(0), 171 m_videoBitsPerSecond(0),
172 m_state(State::Inactive), 172 m_state(State::Inactive),
173 m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaRecorder>::create( 173 m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaRecorder>::create(
174 this, 174 this,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 ContentType contentType(type); 297 ContentType contentType(type);
298 return handler->canSupportMimeType(contentType.type(), 298 return handler->canSupportMimeType(contentType.type(),
299 contentType.parameter("codecs")); 299 contentType.parameter("codecs"));
300 } 300 }
301 301
302 const AtomicString& MediaRecorder::interfaceName() const { 302 const AtomicString& MediaRecorder::interfaceName() const {
303 return EventTargetNames::MediaRecorder; 303 return EventTargetNames::MediaRecorder;
304 } 304 }
305 305
306 ExecutionContext* MediaRecorder::getExecutionContext() const { 306 ExecutionContext* MediaRecorder::getExecutionContext() const {
307 return ActiveDOMObject::getExecutionContext(); 307 return SuspendableObject::getExecutionContext();
308 } 308 }
309 309
310 void MediaRecorder::suspend() { 310 void MediaRecorder::suspend() {
311 m_dispatchScheduledEventRunner->suspend(); 311 m_dispatchScheduledEventRunner->suspend();
312 } 312 }
313 313
314 void MediaRecorder::resume() { 314 void MediaRecorder::resume() {
315 m_dispatchScheduledEventRunner->resume(); 315 m_dispatchScheduledEventRunner->resume();
316 } 316 }
317 317
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 for (const auto& event : events) 390 for (const auto& event : events)
391 dispatchEvent(event); 391 dispatchEvent(event);
392 } 392 }
393 393
394 DEFINE_TRACE(MediaRecorder) { 394 DEFINE_TRACE(MediaRecorder) {
395 visitor->trace(m_stream); 395 visitor->trace(m_stream);
396 visitor->trace(m_dispatchScheduledEventRunner); 396 visitor->trace(m_dispatchScheduledEventRunner);
397 visitor->trace(m_scheduledEvents); 397 visitor->trace(m_scheduledEvents);
398 EventTargetWithInlineData::trace(visitor); 398 EventTargetWithInlineData::trace(visitor);
399 ActiveDOMObject::trace(visitor); 399 SuspendableObject::trace(visitor);
400 } 400 }
401 401
402 } // namespace blink 402 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698