summaryrefslogtreecommitdiffstats
path: root/content/browser/speech/speech_recognizer_impl.h
diff options
context:
space:
mode:
authorprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 10:54:31 +0000
committerprimiano@chromium.org <primiano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-29 10:54:31 +0000
commit2a8c471f6fbeb867cd5187e7149288591de571b2 (patch)
tree4b6abe7e121fa2dab2e9357aa2fa260fa419da98 /content/browser/speech/speech_recognizer_impl.h
parentc28fb310f9737fb901e5638ec3ec04626b7777e2 (diff)
downloadchromium_src-2a8c471f6fbeb867cd5187e7149288591de571b2.zip
chromium_src-2a8c471f6fbeb867cd5187e7149288591de571b2.tar.gz
chromium_src-2a8c471f6fbeb867cd5187e7149288591de571b2.tar.bz2
Fixed a regression on speech arisen after r129173 .
Made OnAudioClosed a member of SpeechRecognizerImpl. In this way, the closure used in the call to audio_controller_->Close() will hold a reference on SpeechRecognizerImpl until the Close has finished. Without this, the OnData method might be called from the audio thread after the object has been destructed. BUG=120173 TEST=none. Review URL: https://chromiumcodereview.appspot.com/9791070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech/speech_recognizer_impl.h')
-rw-r--r--content/browser/speech/speech_recognizer_impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index 8e9adcc..eed04bc 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -85,6 +85,8 @@ class CONTENT_EXPORT SpeechRecognizerImpl
// Handles OnData in the IO thread.
void HandleOnData(scoped_refptr<AudioChunk> raw_audio);
+ void OnAudioClosed(media::AudioInputController*);
+
// Helper method which closes the audio controller and frees it asynchronously
// without blocking the IO thread.
void CloseAudioControllerAsynchronously();