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

Unified Diff: third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp

Issue 1540303003: MediaRecorder: update to spec (3/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted DEPS to master Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
diff --git a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
index a5fba4558ef597488ec8b5f262c41a2e4dfe8b57..2b31fcba49721f8479126502ad1a8ebf2177966e 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
+++ b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
@@ -6,12 +6,10 @@
#include "modules/mediarecorder/MediaRecorder.h"
#include "bindings/core/v8/Dictionary.h"
-#include "core/dom/DOMError.h"
+#include "core/events/Event.h"
#include "core/fileapi/Blob.h"
-#include "modules/EventModules.h"
#include "modules/EventTargetModules.h"
#include "modules/mediarecorder/BlobEvent.h"
-#include "modules/mediarecorder/MediaRecorderErrorEvent.h"
#include "platform/ContentType.h"
#include "platform/NotImplemented.h"
#include "platform/blob/BlobData.h"
@@ -224,28 +222,10 @@ void MediaRecorder::writeData(const char* data, size_t length, bool lastInSlice)
createBlobEvent(Blob::create(BlobDataHandle::create(m_blobData.release(), blobDataLength)));
}
-void MediaRecorder::failOutOfMemory(const WebString& message)
+void MediaRecorder::onError(const WebString& message)
{
- scheduleDispatchEvent(MediaRecorderErrorEvent::create(
- EventTypeNames::error, false, false, "OutOfMemory", message));
-
- if (m_state == State::Recording)
- stopRecording();
-}
-
-void MediaRecorder::failIllegalStreamModification(const WebString& message)
-{
- scheduleDispatchEvent(MediaRecorderErrorEvent::create(
- EventTypeNames::error, false, false, "IllegalStreamModification", message));
-
- if (m_state == State::Recording)
- stopRecording();
-}
-
-void MediaRecorder::failOtherRecordingError(const WebString& message)
-{
- scheduleDispatchEvent(MediaRecorderErrorEvent::create(
- EventTypeNames::error, false, false, "OtherRecordingError", message));
+ // TODO(mcasas): Beef up the Error Event and add the |message|, see https://github.com/w3c/mediacapture-record/issues/31
+ scheduleDispatchEvent(Event::create(EventTypeNames::error));
if (m_state == State::Recording)
stopRecording();

Powered by Google App Engine
This is Rietveld 408576698