summaryrefslogtreecommitdiffstats
path: root/content/browser/speech
diff options
context:
space:
mode:
authorvrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 19:50:50 +0000
committervrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 19:50:50 +0000
commitf3a1b854e9afeeee2121abda50df6da9242c4410 (patch)
tree5bd99fea32252ef037bc8b936ec19f04bd50e868 /content/browser/speech
parent897bfb5aaaa57f0338a77fada1d5d3f9c3b38226 (diff)
downloadchromium_src-f3a1b854e9afeeee2121abda50df6da9242c4410.zip
chromium_src-f3a1b854e9afeeee2121abda50df6da9242c4410.tar.gz
chromium_src-f3a1b854e9afeeee2121abda50df6da9242c4410.tar.bz2
Revert 130180 - Move media/audio files into media namespace
BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 TBR=vrk@google.com Review URL: https://chromiumcodereview.appspot.com/9965076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech')
-rw-r--r--content/browser/speech/input_tag_speech_dispatcher_host.cc2
-rw-r--r--content/browser/speech/input_tag_speech_dispatcher_host.h9
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.cc2
-rw-r--r--content/browser/speech/speech_recognizer_impl.cc10
-rw-r--r--content/browser/speech/speech_recognizer_impl.h5
-rw-r--r--content/browser/speech/speech_recognizer_impl_unittest.cc10
6 files changed, 15 insertions, 23 deletions
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.cc b/content/browser/speech/input_tag_speech_dispatcher_host.cc
index 6ec3be0..7c10270 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.cc
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.cc
@@ -118,7 +118,7 @@ InputTagSpeechDispatcherHost::InputTagSpeechDispatcherHost(
int render_process_id,
net::URLRequestContextGetter* context_getter,
content::SpeechRecognitionPreferences* recognition_preferences,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: render_process_id_(render_process_id),
may_have_pending_requests_(false),
context_getter_(context_getter),
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.h b/content/browser/speech/input_tag_speech_dispatcher_host.h
index c988faf..61d68b0 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.h
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.h
@@ -10,6 +10,7 @@
#include "content/public/browser/browser_message_filter.h"
#include "net/url_request/url_request_context_getter.h"
+class AudioManager;
struct InputTagSpeechHostMsg_StartRecognition_Params;
namespace content {
@@ -17,10 +18,6 @@ class SpeechRecognitionPreferences;
struct SpeechRecognitionResult;
}
-namespace media {
-class AudioManager;
-}
-
namespace speech {
class SpeechRecognitionManagerImpl;
@@ -37,7 +34,7 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost
int render_process_id,
net::URLRequestContextGetter* context_getter,
content::SpeechRecognitionPreferences* recognition_preferences,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
// Methods called by SpeechRecognitionManagerImpl.
void SetRecognitionResult(int caller_id,
@@ -69,7 +66,7 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost
scoped_refptr<net::URLRequestContextGetter> context_getter_;
scoped_refptr<content::SpeechRecognitionPreferences> recognition_preferences_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
static SpeechRecognitionManagerImpl* manager_;
diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc
index 7600b50..e9d9d01 100644
--- a/content/browser/speech/speech_recognition_manager_impl.cc
+++ b/content/browser/speech/speech_recognition_manager_impl.cc
@@ -114,7 +114,7 @@ void SpeechRecognitionManagerImpl::ShowAudioInputSettings() {
return;
}
- media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
+ AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
DCHECK(audio_manager->CanShowAudioInputSettings());
if (audio_manager->CanShowAudioInputSettings())
audio_manager->ShowAudioInputSettings();
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 07bd75e..05f81e7 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -23,7 +23,6 @@ using content::SpeechRecognitionEventListener;
using content::SpeechRecognitionResult;
using content::SpeechRecognizer;
using media::AudioInputController;
-using media::AudioManager;
namespace {
@@ -138,12 +137,13 @@ void SpeechRecognizerImpl::StartRecognition() {
endpointer_.SetEnvironmentEstimationMode();
AudioManager* audio_manager = (testing_audio_manager_ != NULL) ?
- testing_audio_manager_ : BrowserMainLoop::GetAudioManager();
+ testing_audio_manager_ :
+ BrowserMainLoop::GetAudioManager();
const int samples_per_packet = kAudioSampleRate *
GoogleOneShotRemoteEngine::kAudioPacketIntervalMs / 1000;
- media::AudioParameters params(
- media::AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout,
- kAudioSampleRate, kNumBitsPerAudioSample, samples_per_packet);
+ AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout,
+ kAudioSampleRate, kNumBitsPerAudioSample,
+ samples_per_packet);
audio_controller_ = AudioInputController::Create(audio_manager, this, params);
DCHECK(audio_controller_.get());
VLOG(1) << "SpeechRecognizer starting record.";
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index 516dfea..eed04bc 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -22,7 +22,6 @@ struct SpeechRecognitionResult;
namespace media {
class AudioInputController;
-class AudioManager;
}
namespace speech {
@@ -92,10 +91,10 @@ class CONTENT_EXPORT SpeechRecognizerImpl
// without blocking the IO thread.
void CloseAudioControllerAsynchronously();
- void SetAudioManagerForTesting(media::AudioManager* audio_manager);
+ void SetAudioManagerForTesting(AudioManager* audio_manager);
content::SpeechRecognitionEventListener* listener_;
- media::AudioManager* testing_audio_manager_;
+ AudioManager* testing_audio_manager_;
scoped_ptr<SpeechRecognitionEngine> recognition_engine_;
Endpointer endpointer_;
scoped_refptr<media::AudioInputController> audio_controller_;
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc
index 01b7e4c..d553064 100644
--- a/content/browser/speech/speech_recognizer_impl_unittest.cc
+++ b/content/browser/speech/speech_recognizer_impl_unittest.cc
@@ -20,16 +20,12 @@
using content::BrowserThread;
using content::BrowserThreadImpl;
using media::AudioInputController;
-using media::AudioInputStream;
-using media::AudioManager;
-using media::AudioOutputStream;
-using media::AudioParameters;
using media::TestAudioInputController;
using media::TestAudioInputControllerFactory;
namespace {
-class MockAudioManager : public media::AudioManagerBase {
+class MockAudioManager : public AudioManagerBase {
public:
MockAudioManager() {
audio_thread_.reset(new base::Thread("MockAudioThread"));
@@ -44,7 +40,7 @@ class MockAudioManager : public media::AudioManagerBase {
media::AudioDeviceNames* device_names) OVERRIDE {}
virtual AudioOutputStream* MakeAudioOutputStream(
const AudioParameters& params) OVERRIDE {
- return media::FakeAudioOutputStream::MakeFakeStream(this, params);
+ return FakeAudioOutputStream::MakeFakeStream(this, params);
}
virtual AudioOutputStream* MakeAudioOutputStreamProxy(
const AudioParameters& params) OVERRIDE {
@@ -53,7 +49,7 @@ class MockAudioManager : public media::AudioManagerBase {
}
virtual AudioInputStream* MakeAudioInputStream(
const AudioParameters& params, const std::string& device_id) OVERRIDE {
- return media::FakeAudioInputStream::MakeFakeStream(this, params);
+ return FakeAudioInputStream::MakeFakeStream(this, params);
}
virtual AudioOutputStream* MakeLinearOutputStream(
const AudioParameters& params) OVERRIDE {