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

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

Issue 2624403002: Refactor AudioInputController and related interfaces. (Closed)
Patch Set: Address comments Created 3 years, 11 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
Index: content/browser/speech/speech_recognizer_impl.h
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index e0a632e907c9c871a4ee09b9a8e5ea5bb119959d..f28417143d6902e32d769ab6c096e692f8cf2804 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -32,6 +32,7 @@ class SpeechRecognitionEventListener;
class CONTENT_EXPORT SpeechRecognizerImpl
: public SpeechRecognizer,
public media::AudioInputController::EventHandler,
+ public media::AudioInputController::SyncWriter,
public NON_EXPORTED_BASE(SpeechRecognitionEngine::Delegate) {
public:
static const int kAudioSampleRate;
@@ -134,11 +135,16 @@ class CONTENT_EXPORT SpeechRecognizerImpl
void OnCreated(media::AudioInputController* controller) override {}
void OnError(media::AudioInputController* controller,
media::AudioInputController::ErrorCode error_code) override;
- void OnData(media::AudioInputController* controller,
- const media::AudioBus* data) override;
void OnLog(media::AudioInputController* controller,
const std::string& message) override {}
+ // AudioInputController::SyncWriter methods.
+ void Write(const media::AudioBus* data,
+ double volume,
+ bool key_pressed,
+ uint32_t hardware_delay_bytes) override;
+ void Close() override;
+
// SpeechRecognitionEngineDelegate methods.
void OnSpeechRecognitionEngineResults(
const SpeechRecognitionResults& results) override;
« no previous file with comments | « content/browser/speech/speech_recognition_browsertest.cc ('k') | content/browser/speech/speech_recognizer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698