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/common/render_messages_internal.h | |
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/common/render_messages_internal.h')
-rw-r--r-- | chrome/common/render_messages_internal.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 76d2585..66ce013 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -976,6 +976,19 @@ IPC_BEGIN_MESSAGES(View) IPC_MESSAGE_ROUTED1(ViewMsg_AccessibilityDoDefaultAction, int /* object id */) + // Relay a speech recognition result, either partial or final. + IPC_MESSAGE_ROUTED1(ViewMsg_SpeechInput_SetRecognitionResult, + string16 /* result */) + + // Indicate that speech recognizer has stopped recording and started + // recognition. + IPC_MESSAGE_ROUTED0(ViewMsg_SpeechInput_RecordingComplete) + + // Indicate that speech recognizer has completed recognition. This will be + // the last message sent in response to a + // ViewHostMsg_SpeechInput_StartRecognition. + IPC_MESSAGE_ROUTED0(ViewMsg_SpeechInput_RecognitionComplete) + IPC_END_MESSAGES(View) @@ -2539,4 +2552,22 @@ IPC_BEGIN_MESSAGES(ViewHost) // This allows the browser to handle things such as zooming differently. IPC_MESSAGE_ROUTED0(ViewHostMsg_SetDisplayingPDFContent) + // Requests the speech input service to start speech recognition on behalf of + // the given |render_view_id|. + IPC_MESSAGE_CONTROL1(ViewHostMsg_SpeechInput_StartRecognition, + int /* render_view_id */) + + // Requests the speech input service to cancel speech recognition on behalf of + // the given |render_view_id|. If speech recognition is not happening nor or + // is happening on behalf of some other render view, this call does nothing. + IPC_MESSAGE_CONTROL1(ViewHostMsg_SpeechInput_CancelRecognition, + int /* render_view_id */) + + // Requests the speech input service to stop audio recording on behalf of + // the given |render_view_id|. Any audio recorded so far will be fed to the + // speech recognizer. If speech recognition is not happening nor or is + // happening on behalf of some other render view, this call does nothing. + IPC_MESSAGE_CONTROL1(ViewHostMsg_SpeechInput_StopRecording, + int /* render_view_id */) + IPC_END_MESSAGES(ViewHost) |