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

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

Issue 10377082: SpeechInputExtensionManager now interface with SpeechRecognitionManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase before dcommit Created 8 years, 7 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 | « content/browser/speech/speech_recognizer_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognizer_impl.cc
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 3e474dca73a184d9f8da5fc90cfe7cc247fcee07..18c6c9ffffc7ce06aeaba33b9120c704fc98c765 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -12,7 +12,6 @@
#include "content/browser/speech/google_one_shot_remote_engine.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/speech_recognition_event_listener.h"
-#include "content/public/browser/speech_recognizer.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_grammar.h"
#include "content/public/common/speech_recognition_result.h"
@@ -24,7 +23,6 @@ using content::SpeechRecognitionError;
using content::SpeechRecognitionEventListener;
using content::SpeechRecognitionGrammar;
using content::SpeechRecognitionResult;
-using content::SpeechRecognizer;
using media::AudioInputController;
using media::AudioManager;
using media::AudioParameters;
@@ -68,41 +66,6 @@ void KeepAudioControllerRefcountedForDtor(scoped_refptr<AudioInputController>) {
} // namespace
-// TODO(primiano) Create(...) is transitional (until we fix speech input
-// extensions) and should be removed soon. The manager should be the only one
-// knowing the existence of SpeechRecognizer(Impl), thus the only one in charge
-// of instantiating it.
-SpeechRecognizer* SpeechRecognizer::Create(
- SpeechRecognitionEventListener* listener,
- int session_id,
- const std::string& language,
- const std::string& grammar,
- net::URLRequestContextGetter* context_getter,
- bool filter_profanities,
- const std::string& hardware_info,
- const std::string& origin_url) {
- speech::SpeechRecognitionEngineConfig remote_engine_config;
- remote_engine_config.language = language;
- if (!grammar.empty())
- remote_engine_config.grammars.push_back(SpeechRecognitionGrammar(grammar));
- remote_engine_config.audio_sample_rate =
- speech::SpeechRecognizerImpl::kAudioSampleRate;
- remote_engine_config.audio_num_bits_per_sample =
- speech::SpeechRecognizerImpl::kNumBitsPerAudioSample;
- remote_engine_config.filter_profanities = filter_profanities;
- remote_engine_config.hardware_info = hardware_info;
- remote_engine_config.origin_url = origin_url;
-
- // SpeechRecognizerImpl takes ownership of google_remote_engine.
- speech::GoogleOneShotRemoteEngine* google_remote_engine =
- new speech::GoogleOneShotRemoteEngine(context_getter);
- google_remote_engine->SetConfig(remote_engine_config);
-
- return new speech::SpeechRecognizerImpl(listener,
- session_id,
- google_remote_engine);
-}
-
namespace speech {
const int SpeechRecognizerImpl::kAudioSampleRate = 16000;
« no previous file with comments | « content/browser/speech/speech_recognizer_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698