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

Unified Diff: Source/modules/mediastream/UserMediaRequest.cpp

Issue 19724003: Revert "Transition modules/** to use ExceptionState" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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: Source/modules/mediastream/UserMediaRequest.cpp
diff --git a/Source/modules/mediastream/UserMediaRequest.cpp b/Source/modules/mediastream/UserMediaRequest.cpp
index ceb28b370bfca371935888d9dfa44ea94d03e495..0791a02251bae12eb43516d443f63e80de565a59 100644
--- a/Source/modules/mediastream/UserMediaRequest.cpp
+++ b/Source/modules/mediastream/UserMediaRequest.cpp
@@ -34,8 +34,8 @@
#include "modules/mediastream/UserMediaRequest.h"
#include "bindings/v8/Dictionary.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/Document.h"
+#include "core/dom/ExceptionCode.h"
#include "core/dom/SpaceSplitString.h"
#include "core/platform/mediastream/MediaStreamCenter.h"
#include "core/platform/mediastream/MediaStreamDescriptor.h"
@@ -45,14 +45,14 @@
namespace WebCore {
-static PassRefPtr<MediaConstraintsImpl> parseOptions(const Dictionary& options, const String& mediaType, ExceptionState& es)
+static PassRefPtr<MediaConstraintsImpl> parseOptions(const Dictionary& options, const String& mediaType, ExceptionCode& ec)
{
RefPtr<MediaConstraintsImpl> constraints;
Dictionary constraintsDictionary;
bool ok = options.get(mediaType, constraintsDictionary);
if (ok && !constraintsDictionary.isUndefinedOrNull())
- constraints = MediaConstraintsImpl::create(constraintsDictionary, es);
+ constraints = MediaConstraintsImpl::create(constraintsDictionary, ec);
else {
bool mediaRequested = false;
options.get(mediaType, mediaRequested);
@@ -63,14 +63,14 @@ static PassRefPtr<MediaConstraintsImpl> parseOptions(const Dictionary& options,
return constraints.release();
}
-PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionState& es)
+PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionCode& ec)
{
- RefPtr<MediaConstraintsImpl> audio = parseOptions(options, ASCIILiteral("audio"), es);
- if (es.hadException())
+ RefPtr<MediaConstraintsImpl> audio = parseOptions(options, ASCIILiteral("audio"), ec);
+ if (ec)
return 0;
- RefPtr<MediaConstraintsImpl> video = parseOptions(options, ASCIILiteral("video"), es);
- if (es.hadException())
+ RefPtr<MediaConstraintsImpl> video = parseOptions(options, ASCIILiteral("video"), ec);
+ if (ec)
return 0;
if (!audio && !video)
« no previous file with comments | « Source/modules/mediastream/UserMediaRequest.h ('k') | Source/modules/navigatorcontentutils/NavigatorContentUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698