| Index: content/test/webrtc_audio_device_test.h
|
| diff --git a/content/test/webrtc_audio_device_test.h b/content/test/webrtc_audio_device_test.h
|
| index 64097940ccf1ba0de128625c89694488be73d23b..872817c92b6a041a62c48058aad56ba661c05ce9 100644
|
| --- a/content/test/webrtc_audio_device_test.h
|
| +++ b/content/test/webrtc_audio_device_test.h
|
| @@ -14,6 +14,7 @@
|
| #include "content/browser/renderer_host/media/mock_media_observer.h"
|
| #include "content/public/renderer/content_renderer_client.h"
|
| #include "ipc/ipc_listener.h"
|
| +#include "media/base/audio_hardware_config.h"
|
| #include "media/base/channel_layout.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/webrtc/common_types.h"
|
| @@ -109,18 +110,6 @@ class WebRTCAutoDelete {
|
| T* ptr_;
|
| };
|
|
|
| -// Individual tests can provide an implementation (or mock) of this interface
|
| -// when the audio code queries for hardware capabilities on the IO thread.
|
| -class AudioUtilInterface {
|
| - public:
|
| - virtual ~AudioUtilInterface() {}
|
| - virtual int GetAudioHardwareSampleRate() = 0;
|
| - virtual int GetAudioInputHardwareSampleRate(
|
| - const std::string& device_id) = 0;
|
| - virtual media::ChannelLayout GetAudioInputHardwareChannelLayout(
|
| - const std::string& device_id) = 0;
|
| -};
|
| -
|
| // Implemented and defined in the cc file.
|
| class ReplaceContentClientRenderer;
|
|
|
| @@ -135,7 +124,7 @@ class WebRTCAudioDeviceTest : public ::testing::Test, public IPC::Listener {
|
| // Sends an IPC message to the IO thread channel.
|
| bool Send(IPC::Message* message);
|
|
|
| - void SetAudioUtilCallback(AudioUtilInterface* callback);
|
| + void SetAudioHardwareConfig(media::AudioHardwareConfig* hardware_config);
|
|
|
| protected:
|
| void InitializeIOThread(const char* thread_name);
|
| @@ -143,9 +132,9 @@ class WebRTCAudioDeviceTest : public ::testing::Test, public IPC::Listener {
|
| void CreateChannel(const char* name);
|
| void DestroyChannel();
|
|
|
| - void OnGetHardwareSampleRate(int* sample_rate);
|
| - void OnGetHardwareInputSampleRate(int* sample_rate);
|
| - void OnGetHardwareInputChannelLayout(media::ChannelLayout* channels);
|
| + void OnGetAudioHardwareConfig(int* output_buffer_size,
|
| + int* output_sample_rate, int* input_sample_rate,
|
| + media::ChannelLayout* input_channel_layout);
|
|
|
| // IPC::Listener implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| @@ -177,7 +166,7 @@ class WebRTCAudioDeviceTest : public ::testing::Test, public IPC::Listener {
|
| scoped_refptr<AudioRendererHost> audio_render_host_;
|
| scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_;
|
|
|
| - AudioUtilInterface* audio_util_callback_; // Weak reference.
|
| + media::AudioHardwareConfig* audio_hardware_config_; // Weak reference.
|
|
|
| // Initialized on the main test thread that we mark as the UI thread.
|
| scoped_ptr<TestBrowserThread> ui_thread_;
|
|
|