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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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/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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 MediaRecorder* MediaRecorder::create(ExecutionContext* context, MediaStream* str eam, const MediaRecorderOptions& options, ExceptionState& exceptionState) 126 MediaRecorder* MediaRecorder::create(ExecutionContext* context, MediaStream* str eam, const MediaRecorderOptions& options, ExceptionState& exceptionState)
127 { 127 {
128 MediaRecorder* recorder = new MediaRecorder(context, stream, options, except ionState); 128 MediaRecorder* recorder = new MediaRecorder(context, stream, options, except ionState);
129 recorder->suspendIfNeeded(); 129 recorder->suspendIfNeeded();
130 130
131 return recorder; 131 return recorder;
132 } 132 }
133 133
134 MediaRecorder::MediaRecorder(ExecutionContext* context, MediaStream* stream, con st MediaRecorderOptions& options, ExceptionState& exceptionState) 134 MediaRecorder::MediaRecorder(ExecutionContext* context, MediaStream* stream, con st MediaRecorderOptions& options, ExceptionState& exceptionState)
135 : ActiveDOMObject(context) 135 : ActiveScriptWrappable(this)
136 , ActiveDOMObject(context)
136 , m_stream(stream) 137 , m_stream(stream)
137 , m_streamAmountOfTracks(stream->getTracks().size()) 138 , m_streamAmountOfTracks(stream->getTracks().size())
138 , m_mimeType(options.mimeType()) 139 , m_mimeType(options.mimeType())
139 , m_stopped(true) 140 , m_stopped(true)
140 , m_ignoreMutedMedia(true) 141 , m_ignoreMutedMedia(true)
141 , m_audioBitsPerSecond(0) 142 , m_audioBitsPerSecond(0)
142 , m_videoBitsPerSecond(0) 143 , m_videoBitsPerSecond(0)
143 , m_state(State::Inactive) 144 , m_state(State::Inactive)
144 , m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaRecorder>::create(th is, &MediaRecorder::dispatchScheduledEvent)) 145 , m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaRecorder>::create(th is, &MediaRecorder::dispatchScheduledEvent))
145 { 146 {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 DEFINE_TRACE(MediaRecorder) 352 DEFINE_TRACE(MediaRecorder)
352 { 353 {
353 visitor->trace(m_stream); 354 visitor->trace(m_stream);
354 visitor->trace(m_dispatchScheduledEventRunner); 355 visitor->trace(m_dispatchScheduledEventRunner);
355 visitor->trace(m_scheduledEvents); 356 visitor->trace(m_scheduledEvents);
356 RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder>::trace(vi sitor); 357 RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder>::trace(vi sitor);
357 ActiveDOMObject::trace(visitor); 358 ActiveDOMObject::trace(visitor);
358 } 359 }
359 360
360 } // namespace blink 361 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698