diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 08:47:09 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 08:47:09 +0000 |
commit | befab4b7c401a2368fe313db1be59c83626c6b36 (patch) | |
tree | 07abbabbe42a391265c21d0f843c86d122abec96 /chrome/renderer/speech_input_dispatcher.h | |
parent | 2ae27702b4bd9bf31a19024131ba701c9253297c (diff) | |
download | chromium_src-befab4b7c401a2368fe313db1be59c83626c6b36.zip chromium_src-befab4b7c401a2368fe313db1be59c83626c6b36.tar.gz chromium_src-befab4b7c401a2368fe313db1be59c83626c6b36.tar.bz2 |
Added grammar attribute to speech input.
In https://bugs.webkit.org/show_bug.cgi?id=48339 we added support for a 'x-webkit-grammar' attribute for speech input.
In this CL we receive that as a parameter to SpeechInputDispatcher::startRecognition() and pass it up to the
SpeechRecognitionRequest object which encodes and sends it as a url parameter to the server.
To aid in this I also moved the speech server URL from SpeechRecognizer.cc to SpeechRecognitionRequest.cc.
Also added a browser test for this attribute. It is marked as FLAKY now because the code is exactly the same as with
the TestBasicRecognition test in that file and that test is FLAKY now. Both are marked with the same bug and I will
remove the FLAKY_ prefix on both when the bug is closed.
BUG=none
TEST=browser_tests --gtest_filter=SpeechInputBrowserTest.GrammarAttribute
Review URL: http://codereview.chromium.org/4183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/speech_input_dispatcher.h')
-rw-r--r-- | chrome/renderer/speech_input_dispatcher.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/speech_input_dispatcher.h b/chrome/renderer/speech_input_dispatcher.h index e7d298c..b12859e 100644 --- a/chrome/renderer/speech_input_dispatcher.h +++ b/chrome/renderer/speech_input_dispatcher.h @@ -34,9 +34,11 @@ class SpeechInputDispatcher : public WebKit::WebSpeechInputController { // TODO(leandro): this is a temporary fix for a two-sided patch. // https://bugs.webkit.org/show_bug.cgi?id=47089 bool startRecognition(int request_id, const WebKit::WebString& language, - const WebKit::WebRect& element_rect); + const WebKit::WebRect& element_rect, + const WebKit::WebString& grammar); - bool startRecognition(int request_id, const WebKit::WebRect& element_rect); + bool startRecognition(int request_id, const WebKit::WebRect& element_rect, + const WebKit::WebString& grammar); void cancelRecognition(int request_id); void stopRecording(int request_id); |