Chromium Code Reviews| Index: content/public/browser/speech_recognition_manager_delegate.h |
| diff --git a/content/public/browser/speech_recognition_manager_delegate.h b/content/public/browser/speech_recognition_manager_delegate.h |
| index 7156bc2c7092247b3e0a5f07aaa1b7e8c5add019..a801b46d8a716342b89b8846f053326f142d4dc3 100644 |
| --- a/content/public/browser/speech_recognition_manager_delegate.h |
| +++ b/content/public/browser/speech_recognition_manager_delegate.h |
| @@ -10,10 +10,6 @@ |
| #include "content/public/common/speech_recognition_error.h" |
| -namespace gfx { |
| -class Rect; |
| -} |
| - |
| namespace content { |
| struct SpeechRecognitionResult; |
| @@ -22,26 +18,20 @@ struct SpeechRecognitionResult; |
| // user's permission and for fetching optional request information. |
| class SpeechRecognitionManagerDelegate { |
| public: |
| - // Describes the microphone errors that are reported via ShowMicError. |
| - enum MicError { |
| - MIC_ERROR_NO_DEVICE_AVAILABLE = 0, |
| - MIC_ERROR_DEVICE_IN_USE |
| - }; |
| - |
| virtual ~SpeechRecognitionManagerDelegate() {} |
| - // Get the optional request information if available. |
| - virtual void GetRequestInfo(bool* can_report_metrics, |
| - std::string* request_info) = 0; |
| + // Get the optional diagnostic hardware information if available. |
| + virtual void GetDiagnosticInformation(bool* can_report_metrics, |
| + std::string* hardware_info) = 0; |
| - // Called when recognition has been requested from point |element_rect_| on |
| - // the view port for the given caller. The embedder should call the |
| - // StartRecognition or CancelRecognition methods on SpeechInutManager in |
| - // response. |
| - virtual void ShowRecognitionRequested(int session_id, |
| - int render_process_id, |
| - int render_view_id, |
| - const gfx::Rect& element_rect) = 0; |
| + // Called when recognition has been requested. The source point of the view |
| + // port can be retrieved looking-up the session context. |
| + // The embedder should call the StartRecognition or CancelRecognition methods |
| + // on SpeechInutManager in response. TODO(primiano) ?!?. |
|
Satish
2012/04/19 13:03:19
is this TODO required? If so, should be at the sta
Primiano Tucci (use gerrit)
2012/04/20 16:06:43
Done.
|
| + virtual void ShowRecognitionRequested(int session_id) = 0; |
| + |
| + // Check if current UI set-up allow speech recognition. |
|
Satish
2012/04/19 13:03:19
allow -> allows
Primiano Tucci (use gerrit)
2012/04/20 16:06:43
Done.
|
| + virtual bool CheckRecognitionIsAllowed(int session_id) = 0; |
|
Satish
2012/04/19 13:03:19
could rename as 'IsRecognitionAllowed'
Primiano Tucci (use gerrit)
2012/04/20 16:06:43
Done.
|
| // Called when recognition is starting up. |
| virtual void ShowWarmUp(int session_id) = 0; |
| @@ -57,12 +47,9 @@ class SpeechRecognitionManagerDelegate { |
| float volume, |
| float noise_volume) = 0; |
| - // Called when no microphone has been found. |
| - virtual void ShowMicError(int session_id, MicError error) = 0; |
| - |
| // Called when there has been a error with the recognition. |
| - virtual void ShowRecognizerError(int session_id, |
| - SpeechRecognitionErrorCode error) = 0; |
| + virtual void ShowError(int session_id, |
| + const SpeechRecognitionError& error) = 0; |
| // Called when recognition has ended or has been canceled. |
| virtual void DoClose(int session_id) = 0; |