| 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..3405223fd2e925f45a54a16b6fff8027bed9a217 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,18 @@ 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.
|
| + virtual void ShowRecognitionRequested(int session_id) = 0;
|
| +
|
| + // Check if current UI set-up allows speech recognition.
|
| + virtual bool IsRecognitionAllowed(int session_id) = 0;
|
|
|
| // Called when recognition is starting up.
|
| virtual void ShowWarmUp(int session_id) = 0;
|
| @@ -57,12 +45,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;
|
|
|