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

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

Issue 1319473016: MediaRecorder: disabling LayoutTests in preparation of Cr CLs and a minor update (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Marking MR layout tests as Skip Created 5 years, 3 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
« no previous file with comments | « LayoutTests/fast/mediarecorder/MediaRecorder-canRecordMimeType-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "modules/mediarecorder/MediaRecorder.h" 6 #include "modules/mediarecorder/MediaRecorder.h"
7 7
8 #include "core/dom/DOMError.h" 8 #include "core/dom/DOMError.h"
9 #include "core/fileapi/Blob.h" 9 #include "core/fileapi/Blob.h"
10 #include "modules/EventModules.h" 10 #include "modules/EventModules.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 MediaRecorder::MediaRecorder(ExecutionContext* context, MediaStream* stream, con st String& mimeType, ExceptionState& exceptionState) 54 MediaRecorder::MediaRecorder(ExecutionContext* context, MediaStream* stream, con st String& mimeType, ExceptionState& exceptionState)
55 : ActiveDOMObject(context) 55 : ActiveDOMObject(context)
56 , m_stream(stream) 56 , m_stream(stream)
57 , m_mimeType(mimeType) 57 , m_mimeType(mimeType)
58 , m_stopped(true) 58 , m_stopped(true)
59 , m_ignoreMutedMedia(true) 59 , m_ignoreMutedMedia(true)
60 , m_state(State::Inactive) 60 , m_state(State::Inactive)
61 , m_dispatchScheduledEventRunner(this, &MediaRecorder::dispatchScheduledEven t) 61 , m_dispatchScheduledEventRunner(this, &MediaRecorder::dispatchScheduledEven t)
62 { 62 {
63 ASSERT(m_stream->getTracks().size());
64
63 m_recorderHandler = adoptPtr(Platform::current()->createMediaRecorderHandler ()); 65 m_recorderHandler = adoptPtr(Platform::current()->createMediaRecorderHandler ());
64 66 ASSERT(m_recorderHandler);
65 // TODO(mcasas): Once http://crbug.com/262211 has landed the Chromium parts,
66 // and more concretetely the createMediaRecorderHandler() implementation,
67 // ASSERT() here for |m_recorderHandler|.
68 67
69 // We deviate from the spec by not returning |UnsupportedOption|, see https: //github.com/w3c/mediacapture-record/issues/18 68 // We deviate from the spec by not returning |UnsupportedOption|, see https: //github.com/w3c/mediacapture-record/issues/18
70 if (!m_recorderHandler) { 69 if (!m_recorderHandler) {
71 exceptionState.throwDOMException(NotSupportedError, "No MediaRecorder ha ndler can be created."); 70 exceptionState.throwDOMException(NotSupportedError, "No MediaRecorder ha ndler can be created.");
72 return; 71 return;
73 } 72 }
74 if (!m_recorderHandler->initialize(this, stream->descriptor(), m_mimeType)) { 73 if (!m_recorderHandler->initialize(this, stream->descriptor(), m_mimeType)) {
75 exceptionState.throwDOMException(NotSupportedError, "Failed to initializ e native MediaRecorder, the type provided " + m_mimeType + "is unsupported." ); 74 exceptionState.throwDOMException(NotSupportedError, "Failed to initializ e native MediaRecorder, the type provided " + m_mimeType + "is unsupported." );
76 return; 75 return;
77 } 76 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 282
284 DEFINE_TRACE(MediaRecorder) 283 DEFINE_TRACE(MediaRecorder)
285 { 284 {
286 visitor->trace(m_stream); 285 visitor->trace(m_stream);
287 visitor->trace(m_scheduledEvents); 286 visitor->trace(m_scheduledEvents);
288 RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder>::trace(vi sitor); 287 RefCountedGarbageCollectedEventTargetWithInlineData<MediaRecorder>::trace(vi sitor);
289 ActiveDOMObject::trace(visitor); 288 ActiveDOMObject::trace(visitor);
290 } 289 }
291 290
292 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/mediarecorder/MediaRecorder-canRecordMimeType-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698