diff options
| author | Ben Murdoch <benm@google.com> | 2010-11-18 18:32:45 +0000 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-11-18 18:38:07 +0000 |
| commit | 513209b27ff55e2841eac0e4120199c23acce758 (patch) | |
| tree | aeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/speech/speech_input_manager.cc | |
| parent | 164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff) | |
| download | external_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2 | |
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/speech/speech_input_manager.cc')
| -rw-r--r-- | chrome/browser/speech/speech_input_manager.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/chrome/browser/speech/speech_input_manager.cc b/chrome/browser/speech/speech_input_manager.cc index 6d9ffd9..181234e 100644 --- a/chrome/browser/speech/speech_input_manager.cc +++ b/chrome/browser/speech/speech_input_manager.cc @@ -28,13 +28,16 @@ class SpeechInputManagerImpl : public SpeechInputManager, int caller_id, int render_process_id, int render_view_id, - const gfx::Rect& element_rect); + const gfx::Rect& element_rect, + const std::string& language, + const std::string& grammar); virtual void CancelRecognition(int caller_id); virtual void StopRecording(int caller_id); // SpeechRecognizer::Delegate methods. - virtual void SetRecognitionResult(int caller_id, bool error, - const string16& value); + virtual void SetRecognitionResult(int caller_id, + bool error, + const SpeechInputResultArray& result); virtual void DidCompleteRecording(int caller_id); virtual void DidCompleteRecognition(int caller_id); virtual void OnRecognizerError(int caller_id, @@ -103,7 +106,9 @@ void SpeechInputManagerImpl::StartRecognition( int caller_id, int render_process_id, int render_view_id, - const gfx::Rect& element_rect) { + const gfx::Rect& element_rect, + const std::string& language, + const std::string& grammar) { DCHECK(!HasPendingRequest(caller_id)); bubble_controller_->CreateBubble(caller_id, render_process_id, render_view_id, @@ -111,7 +116,8 @@ void SpeechInputManagerImpl::StartRecognition( SpeechInputRequest* request = &requests_[caller_id]; request->delegate = delegate; - request->recognizer = new SpeechRecognizer(this, caller_id); + request->recognizer = new SpeechRecognizer(this, caller_id, language, + grammar); request->is_active = false; StartRecognitionForRequest(caller_id); @@ -149,12 +155,10 @@ void SpeechInputManagerImpl::StopRecording(int caller_id) { requests_[caller_id].recognizer->StopRecording(); } -void SpeechInputManagerImpl::SetRecognitionResult(int caller_id, - bool error, - const string16& value) { +void SpeechInputManagerImpl::SetRecognitionResult( + int caller_id, bool error, const SpeechInputResultArray& result) { DCHECK(HasPendingRequest(caller_id)); - GetDelegate(caller_id)->SetRecognitionResult(caller_id, - (error ? string16() : value)); + GetDelegate(caller_id)->SetRecognitionResult(caller_id, result); } void SpeechInputManagerImpl::DidCompleteRecording(int caller_id) { |
