OLD | NEW |
(Empty) | |
| 1 |
| 2 #ifndef SpeechSynthesisErrorEvent_h |
| 3 #define SpeechSynthesisErrorEvent_h |
| 4 |
| 5 #include "modules/EventModules.h" |
| 6 |
| 7 #include "wtf/text/WTFString.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 class SpeechSynthesisErrorEvent final : public Event { |
| 12 DEFINE_WRAPPERTYPEINFO(); |
| 13 public: |
| 14 enum ErrorCode { |
| 15 ErrorCodeNone = 0, |
| 16 ErrorCodeCanceled = 1, |
| 17 ErrorCodeInterrupted = 2, |
| 18 ErrorCodeAudioBusy = 3, |
| 19 ErrorCodeAudioHardware = 4, |
| 20 ErrorCodeNetwork = 5, |
| 21 ErrorCodeSynthesisUnavailable = 6, |
| 22 ErrorCodeSynthesisFailed = 7, |
| 23 ErrorCodeLanguageUnavailable = 8, |
| 24 ErrorCodeVoiceUnavailable = 9, |
| 25 ErrorCodeTextTooLong = 10, |
| 26 ErrorCodeInvalidArgument = 11, |
| 27 }; |
| 28 |
| 29 static PassRefPtrWillBeRawPtr<SpeechSynthesisErrorEvent> create(); |
| 30 static PassRefPtrWillBeRawPtr<SpeechSynthesisErrorEvent> create(ErrorCode); |
| 31 |
| 32 const String& error() { return m_error; } |
| 33 |
| 34 virtual const AtomicString& interfaceName() const override; |
| 35 |
| 36 DEFINE_INLINE_VIRTUAL_TRACE() |
| 37 { |
| 38 Event::trace(visitor); |
| 39 } |
| 40 |
| 41 |
| 42 private: |
| 43 SpeechSynthesisErrorEvent(const String&); |
| 44 SpeechSynthesisErrorEvent(const AtomicString&); |
| 45 |
| 46 String m_error; |
| 47 }; |
| 48 |
| 49 } // namespace blink |
| 50 |
| 51 #endif // SpeechSynthesisErrorEvent_h |
OLD | NEW |