summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 11:01:02 +0000
committerprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 11:01:02 +0000
commitc52b28964090204b87634b396823c3709855079c (patch)
tree1e8e20c58dd735baa7f8312dc115fff224e4e5cd /content/common
parent9104f7e80f0bd0c2353254ec5c354199d965f44d (diff)
downloadchromium_src-c52b28964090204b87634b396823c3709855079c.zip
chromium_src-c52b28964090204b87634b396823c3709855079c.tar.gz
chromium_src-c52b28964090204b87634b396823c3709855079c.tar.bz2
Renamed speech recognition code in preparation for introducing a new speech implementation.
- The general-purpose speech recognition classes (that will be needed also by future code) have been renamed to SpeechRecognition*; - The IPC Messages and dispatcher(host) classes that are only related to the current input tag (x-webkit-speech) support have been renamed to InputTagSpeech*; - The namespace has been renamed from speech_input to speech; BUG=116954 TEST= Review URL: https://chromiumcodereview.appspot.com/9568002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/content_message_generator.h2
-rw-r--r--content/common/speech_recognition_messages.h (renamed from content/common/speech_input_messages.h)59
2 files changed, 30 insertions, 31 deletions
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index 1e6f3c5..9ef7371 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -35,7 +35,7 @@
#include "content/common/quota_messages.h"
#include "content/common/resource_messages.h"
#include "content/common/socket_stream_messages.h"
-#include "content/common/speech_input_messages.h"
+#include "content/common/speech_recognition_messages.h"
#include "content/common/text_input_client_messages.h"
#include "content/common/utility_messages.h"
#include "content/common/view_messages.h"
diff --git a/content/common/speech_input_messages.h b/content/common/speech_recognition_messages.h
index f50e057..7ab76c1 100644
--- a/content/common/speech_input_messages.h
+++ b/content/common/speech_recognition_messages.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,27 +6,27 @@
#include <string>
-#include "content/public/common/speech_input_result.h"
+#include "content/public/common/speech_recognition_result.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "ui/gfx/rect.h"
-#define IPC_MESSAGE_START SpeechInputMsgStart
+#define IPC_MESSAGE_START SpeechRecognitionMsgStart
-IPC_ENUM_TRAITS(content::SpeechInputError)
+IPC_ENUM_TRAITS(content::SpeechRecognitionErrorCode)
-IPC_STRUCT_TRAITS_BEGIN(content::SpeechInputHypothesis)
+IPC_STRUCT_TRAITS_BEGIN(content::SpeechRecognitionHypothesis)
IPC_STRUCT_TRAITS_MEMBER(utterance)
IPC_STRUCT_TRAITS_MEMBER(confidence)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(content::SpeechInputResult)
+IPC_STRUCT_TRAITS_BEGIN(content::SpeechRecognitionResult)
IPC_STRUCT_TRAITS_MEMBER(error)
IPC_STRUCT_TRAITS_MEMBER(hypotheses)
IPC_STRUCT_TRAITS_END()
// Used to start a speech recognition session.
-IPC_STRUCT_BEGIN(SpeechInputHostMsg_StartRecognition_Params)
+IPC_STRUCT_BEGIN(InputTagSpeechHostMsg_StartRecognition_Params)
// The render view requesting speech recognition.
IPC_STRUCT_MEMBER(int, render_view_id)
// Request ID used within the render view.
@@ -35,53 +35,52 @@ IPC_STRUCT_BEGIN(SpeechInputHostMsg_StartRecognition_Params)
IPC_STRUCT_MEMBER(gfx::Rect, element_rect)
// Language to use for speech recognition.
IPC_STRUCT_MEMBER(std::string, language)
- // Speech grammar given by the speech input element.
+ // Speech grammar given by the speech recognition element.
IPC_STRUCT_MEMBER(std::string, grammar)
// URL of the page (or iframe if applicable).
IPC_STRUCT_MEMBER(std::string, origin_url)
IPC_STRUCT_END()
-// Speech input messages sent from the renderer to the browser.
+// Speech recognition messages sent from the renderer to the browser.
-// Requests the speech input service to start speech recognition on behalf of
-// the given |render_view_id|.
-IPC_MESSAGE_CONTROL1(SpeechInputHostMsg_StartRecognition,
- SpeechInputHostMsg_StartRecognition_Params)
+// Requests the speech recognition service to start speech recognition on behalf
+// of the given |render_view_id|.
+IPC_MESSAGE_CONTROL1(InputTagSpeechHostMsg_StartRecognition,
+ InputTagSpeechHostMsg_StartRecognition_Params)
-// Requests the speech input service to cancel speech recognition on behalf of
-// the given |render_view_id|. If speech recognition is not happening or
-// is happening on behalf of some other render view, this call does nothing.
-IPC_MESSAGE_CONTROL2(SpeechInputHostMsg_CancelRecognition,
+// Requests the speech recognition service to cancel speech recognition on
+// behalf of the given |render_view_id|. If speech recognition is not happening
+// or is happening on behalf of some other render view, this call does nothing.
+IPC_MESSAGE_CONTROL2(InputTagSpeechHostMsg_CancelRecognition,
int /* render_view_id */,
int /* request_id */)
-// Requests the speech input service to stop audio recording on behalf of
+// Requests the speech recognition 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_CONTROL2(SpeechInputHostMsg_StopRecording,
+IPC_MESSAGE_CONTROL2(InputTagSpeechHostMsg_StopRecording,
int /* render_view_id */,
int /* request_id */)
-// Speech input messages sent from the browser to the renderer.
+// Speech recognition messages sent from the browser to the renderer.
// Relay a speech recognition result, either partial or final.
-IPC_MESSAGE_ROUTED2(SpeechInputMsg_SetRecognitionResult,
+IPC_MESSAGE_ROUTED2(InputTagSpeechMsg_SetRecognitionResult,
int /* request_id */,
- content::SpeechInputResult /* result */)
+ content::SpeechRecognitionResult /* result */)
// Indicate that speech recognizer has stopped recording and started
// recognition.
-IPC_MESSAGE_ROUTED1(SpeechInputMsg_RecordingComplete,
+IPC_MESSAGE_ROUTED1(InputTagSpeechMsg_RecordingComplete,
int /* request_id */)
-// Indicate that speech recognizer has completed recognition. This will be
-// the last message sent in response to a
-// ViewHostMsg_SpeechInput_StartRecognition.
-IPC_MESSAGE_ROUTED1(SpeechInputMsg_RecognitionComplete,
+// Indicate that speech recognizer has completed recognition. This will be the
+// last message sent in response to a InputTagSpeechHostMsg_StartRecognition.
+IPC_MESSAGE_ROUTED1(InputTagSpeechMsg_RecognitionComplete,
int /* request_id */)
-// Toggle speech input on or off on the speech input control for the
+// Toggle speech recognition on or off on the speech input control for the
// current focused element. Has no effect if the current element doesn't
-// support speech input.
-IPC_MESSAGE_ROUTED0(SpeechInputMsg_ToggleSpeechInput)
+// support speech recognition.
+IPC_MESSAGE_ROUTED0(InputTagSpeechMsg_ToggleSpeechInput)