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

Unified Diff: Source/modules/mediastream/NavigatorUserMediaError.h

Issue 23444052: MediaStream API: Updating NavigatorUserMediaError (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a test Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediastream/NavigatorUserMediaError.h
diff --git a/Source/modules/mediastream/NavigatorUserMediaError.h b/Source/modules/mediastream/NavigatorUserMediaError.h
index e3b049662dc3ed341ea126e297430bb1d306d9a5..afb17d1d485aa9535422c3f241bbadadccfe5af5 100644
--- a/Source/modules/mediastream/NavigatorUserMediaError.h
+++ b/Source/modules/mediastream/NavigatorUserMediaError.h
@@ -28,29 +28,36 @@
#include "bindings/v8/ScriptWrappable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
class NavigatorUserMediaError : public RefCounted<NavigatorUserMediaError>, public ScriptWrappable {
public:
- static PassRefPtr<NavigatorUserMediaError> create(const String& name, const String& message, const String& constraintName)
+ enum Name {
+ NamePermissionDenied,
+ NameConstraintNotSatisfied
+ };
+
+ static PassRefPtr<NavigatorUserMediaError> create(Name name, const String& message, const String& constraintName)
{
return adoptRef(new NavigatorUserMediaError(name, message, constraintName));
}
virtual ~NavigatorUserMediaError() { }
- const String& name() const { return m_name; }
+ String name() const;
const String& message() const { return m_message; }
const String& constraintName() const { return m_constraintName; }
private:
- NavigatorUserMediaError(const String& name, const String& message, const String& constraintName) : m_name(name), m_message(message), m_constraintName(constraintName)
+ NavigatorUserMediaError(Name name, const String& message, const String& constraintName)
+ : m_name(name), m_message(message), m_constraintName(constraintName)
{
ScriptWrappable::init(this);
}
- String m_name;
+ Name m_name;
String m_message;
String m_constraintName;
};
« no previous file with comments | « LayoutTests/fast/mediastream/getusermedia-expected.txt ('k') | Source/modules/mediastream/NavigatorUserMediaError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698