Index: Source/modules/speech/SpeechSynthesisErrorEvent.h |
diff --git a/Source/modules/speech/SpeechSynthesisErrorEvent.h b/Source/modules/speech/SpeechSynthesisErrorEvent.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e0c143bacb1aee9cd03837b543398bac1c0d0dd5 |
--- /dev/null |
+++ b/Source/modules/speech/SpeechSynthesisErrorEvent.h |
@@ -0,0 +1,51 @@ |
+ |
+#ifndef SpeechSynthesisErrorEvent_h |
+#define SpeechSynthesisErrorEvent_h |
+ |
+#include "modules/EventModules.h" |
+ |
+#include "wtf/text/WTFString.h" |
+ |
+namespace blink { |
+ |
+class SpeechSynthesisErrorEvent final : public Event { |
+ DEFINE_WRAPPERTYPEINFO(); |
+public: |
+ enum ErrorCode { |
+ ErrorCodeNone = 0, |
+ ErrorCodeCanceled = 1, |
+ ErrorCodeInterrupted = 2, |
+ ErrorCodeAudioBusy = 3, |
+ ErrorCodeAudioHardware = 4, |
+ ErrorCodeNetwork = 5, |
+ ErrorCodeSynthesisUnavailable = 6, |
+ ErrorCodeSynthesisFailed = 7, |
+ ErrorCodeLanguageUnavailable = 8, |
+ ErrorCodeVoiceUnavailable = 9, |
+ ErrorCodeTextTooLong = 10, |
+ ErrorCodeInvalidArgument = 11, |
+ }; |
+ |
+ static PassRefPtrWillBeRawPtr<SpeechSynthesisErrorEvent> create(); |
+ static PassRefPtrWillBeRawPtr<SpeechSynthesisErrorEvent> create(ErrorCode); |
+ |
+ const String& error() { return m_error; } |
+ |
+ virtual const AtomicString& interfaceName() const override; |
+ |
+ DEFINE_INLINE_VIRTUAL_TRACE() |
+ { |
+ Event::trace(visitor); |
+ } |
+ |
+ |
+private: |
+ SpeechSynthesisErrorEvent(const String&); |
+ SpeechSynthesisErrorEvent(const AtomicString&); |
+ |
+ String m_error; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // SpeechSynthesisErrorEvent_h |