diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
| commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
| tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebKit/chromium/public/WebSpeechRecognizerClient.h | |
| parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
| download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz | |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebKit/chromium/public/WebSpeechRecognizerClient.h')
| -rw-r--r-- | Source/WebKit/chromium/public/WebSpeechRecognizerClient.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h index 35c637834..608bfb481 100644 --- a/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h +++ b/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h @@ -37,6 +37,18 @@ class WebString; // A client for reporting progress on speech recognition for a specific handle. class WebSpeechRecognizerClient { public: + enum ErrorCode { + OtherError = 0, + NoSpeechError = 1, + AbortedError = 2, + AudioCaptureError = 3, + NetworkError = 4, + NotAllowedError = 5, + ServiceNotAllowedError = 6, + BadGrammarError = 7, + LanguageNotSupportedError = 8 + }; + // These methods correspond to the events described in the spec: // http://speech-javascript-api-spec.googlecode.com/git/speechapi.html#speechreco-events @@ -74,8 +86,7 @@ public: virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0; // To be called when a speech recognition error occurs. - // FIXME: Introduce an enum for the error code. - virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, unsigned short code) = 0; + virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, ErrorCode) = 0; // To be called when the recognizer has begun to listen to the audio with // the intention of recognizing. |
