diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 22:24:11 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 22:24:11 +0000 |
commit | 638694c1f47e6aa78a0ea55660e5f9f42967ceb9 (patch) | |
tree | 7090242fe50a062b493161ad17ac53862eab700f /chrome/test/data | |
parent | 7ae7a1409240c228ab83136c7918de742950792b (diff) | |
download | chromium_src-638694c1f47e6aa78a0ea55660e5f9f42967ceb9.zip chromium_src-638694c1f47e6aa78a0ea55660e5f9f42967ceb9.tar.gz chromium_src-638694c1f47e6aa78a0ea55660e5f9f42967ceb9.tar.bz2 |
Adds chromium side plumbing to pass speech input calls back and forth with WebKit.
Please advise if any of the code needs to be within "#if ENABLE_INPUT_SPEECH", since most of the speech input code in webkit is under "#if ENABLE(INPUT_SPEECH)"
- Created renderer/SpeechInputDispatcher, implements WebKit::WebSpeechInputController which is used by WebView for invoking speech input.
- Created browser/speech/SpeechInputDispatcherHost to receive IPC messages from the above SpeechInputDispatcher. Nothing done yet apart from receiving the messages.
- Creates new directory chrome/browser/speech, this will be used for SpeechInputDispatcherHost, network based speech recognizer, speech audio recording/buffering code as well as speech output (Text-to-speech) code in future.
BUG=none
TEST=no functionality to test yet.
Review URL: http://codereview.chromium.org/3035035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/speech/basic_recognition.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/test/data/speech/basic_recognition.html b/chrome/test/data/speech/basic_recognition.html new file mode 100644 index 0000000..ef0ccb1 --- /dev/null +++ b/chrome/test/data/speech/basic_recognition.html @@ -0,0 +1,30 @@ +<html>
+ <head>
+ <title>Speech input test</title>
+ <script type="text/javascript">
+ function onspeechresult(value) {
+ if (value == "Pictures of the moon") {
+ document.getElementById('status').innerHTML = 'PASS';
+ document.location = '#pass';
+ } else {
+ document.location = '#fail';
+ }
+ }
+ function run() {
+ // Send a click to the right corner of the input field where the speech
+ // button is rendered.
+ var inputField = document.getElementById('inputField');
+ var evt = document.createEvent('MouseEvents');
+ evt.initMouseEvent('click', true, true, window,
+ 0, 0, 0,
+ inputField.offsetWidth - 4, 4,
+ false, false, false, false, 0, null);
+ inputField.dispatchEvent(evt);
+ }
+ </script>
+ </head>
+ <body onLoad="run()">
+ <input id='inputField' speech onchange="onspeechresult(this.value);"><br>
+ <div id="status">FAIL</div>
+ </body>
+</html>
|