Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2198)

Unified Diff: content/browser/speech/speech_recognizer.h

Issue 10704154: Small refactor to media architecture in order to allow end-to-end tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed MockAudioManager ctor Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/speech/speech_recognizer.cc » ('j') | media/audio/mock_audio_manager.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognizer.h
diff --git a/content/browser/speech/speech_recognizer.h b/content/browser/speech/speech_recognizer.h
index 44db1eeb218b1800ca56ca294b826a8d4fe4e1cc..633f5b72f1a63e30004bcdec504abec4249592d5 100644
--- a/content/browser/speech/speech_recognizer.h
+++ b/content/browser/speech/speech_recognizer.h
@@ -38,6 +38,8 @@ class CONTENT_EXPORT SpeechRecognizer
static const int kNoSpeechTimeoutMs;
static const int kEndpointerEstimationTimeMs;
+ static void SetAudioManagerForTests(media::AudioManager* audio_manager);
+
SpeechRecognizer(
content::SpeechRecognitionEventListener* listener,
int session_id,
@@ -122,7 +124,6 @@ class CONTENT_EXPORT SpeechRecognizer
void UpdateSignalAndNoiseLevels(const float& rms, bool clip_detected);
void CloseAudioControllerAsynchronously();
- void SetAudioManagerForTesting(media::AudioManager* audio_manager);
// Callback called on IO thread by audio_controller->Close().
void OnAudioClosed(media::AudioInputController*);
@@ -141,8 +142,9 @@ class CONTENT_EXPORT SpeechRecognizer
virtual void OnSpeechRecognitionEngineError(
const content::SpeechRecognitionError& error) OVERRIDE;
+ static media::AudioManager* audio_manager_for_tests_;
+
content::SpeechRecognitionEventListener* listener_;
- media::AudioManager* testing_audio_manager_;
scoped_ptr<SpeechRecognitionEngine> recognition_engine_;
Endpointer endpointer_;
scoped_refptr<media::AudioInputController> audio_controller_;
« no previous file with comments | « no previous file | content/browser/speech/speech_recognizer.cc » ('j') | media/audio/mock_audio_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698