Index: third_party/WebKit/Source/core/html/media/MediaError.h |
diff --git a/third_party/WebKit/Source/core/html/media/MediaError.h b/third_party/WebKit/Source/core/html/media/MediaError.h |
index 8580a06a33a4b46a9593e81a81150c28f238c9fd..fc6867207d355c0f6d9c6805fa302df07ed423c4 100644 |
--- a/third_party/WebKit/Source/core/html/media/MediaError.h |
+++ b/third_party/WebKit/Source/core/html/media/MediaError.h |
@@ -29,11 +29,15 @@ |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "core/CoreExport.h" |
#include "platform/heap/Handle.h" |
+#include "wtf/text/WTFString.h" |
namespace blink { |
-class CORE_EXPORT MediaError final : public GarbageCollected<MediaError>, |
- public ScriptWrappable { |
+class JSONObject; |
+ |
+class CORE_EXPORT MediaError final |
+ : public GarbageCollectedFinalized<MediaError>, |
+ public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
@@ -44,16 +48,24 @@ class CORE_EXPORT MediaError final : public GarbageCollected<MediaError>, |
kMediaErrSrcNotSupported, |
}; |
- static MediaError* Create(ErrorCode code) { return new MediaError(code); } |
+ static MediaError* Create(ErrorCode code, const JSONObject* messages) { |
+ return new MediaError(code, messages); |
+ } |
ErrorCode code() const { return code_; } |
+ // Returns either an empty string, or a serialized JSON object describing |
+ // additional error messages. Each object property is named as an error type, |
+ // with value being an array of error messages of that type. |
+ String message() const { return message_; } |
mlamouri (slow - plz ping)
2017/04/12 15:56:41
That's quite unexpected: why are we passing a JSON
foolip
2017/04/12 17:21:52
Yes, if we usually return a string that can be pas
wolenetz
2017/04/12 17:29:57
The format and content of the "message" attribute
foolip
2017/04/12 17:40:40
Can you share an example of what one of the more v
wolenetz
2017/04/13 23:59:10
Per discussion threads, redone as a human-readable
|
+ |
DEFINE_INLINE_TRACE() {} |
private: |
- MediaError(ErrorCode code) : code_(code) {} |
+ MediaError(ErrorCode, const JSONObject*); |
ErrorCode code_; |
+ String message_; |
}; |
} // namespace blink |