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

Unified Diff: Source/modules/speech/SpeechSynthesisErrorEvent.h

Issue 1044053002: [WIP] Add SpeechSynthesisErrorevent Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated 3rd patch Created 5 years, 8 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/speech/SpeechSynthesisErrorEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/speech/SpeechSynthesisErrorEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698