OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 5 #ifndef CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
6 #define CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 6 #define CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 class AudioInputRendererHost; | 48 class AudioInputRendererHost; |
49 class AudioMirroringManager; | 49 class AudioMirroringManager; |
50 class AudioRendererHost; | 50 class AudioRendererHost; |
51 class ContentRendererClient; | 51 class ContentRendererClient; |
52 class MediaStreamManager; | 52 class MediaStreamManager; |
53 class RenderThreadImpl; | 53 class RenderThreadImpl; |
54 class ResourceContext; | 54 class ResourceContext; |
55 class TestBrowserThread; | 55 class TestBrowserThread; |
| 56 class WebRtcAudioRenderer; |
56 class WebRTCMockRenderProcess; | 57 class WebRTCMockRenderProcess; |
57 | 58 |
58 // Scoped class for WebRTC interfaces. Fetches the wrapped interface | 59 // Scoped class for WebRTC interfaces. Fetches the wrapped interface |
59 // in the constructor via WebRTC's GetInterface mechanism and then releases | 60 // in the constructor via WebRTC's GetInterface mechanism and then releases |
60 // the reference in the destructor. | 61 // the reference in the destructor. |
61 template<typename T> | 62 template<typename T> |
62 class ScopedWebRTCPtr { | 63 class ScopedWebRTCPtr { |
63 public: | 64 public: |
64 template<typename Engine> | 65 template<typename Engine> |
65 explicit ScopedWebRTCPtr(Engine* e) | 66 explicit ScopedWebRTCPtr(Engine* e) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 virtual ~MAYBE_WebRTCAudioDeviceTest(); | 128 virtual ~MAYBE_WebRTCAudioDeviceTest(); |
128 | 129 |
129 virtual void SetUp() OVERRIDE; | 130 virtual void SetUp() OVERRIDE; |
130 virtual void TearDown() OVERRIDE; | 131 virtual void TearDown() OVERRIDE; |
131 | 132 |
132 // Sends an IPC message to the IO thread channel. | 133 // Sends an IPC message to the IO thread channel. |
133 bool Send(IPC::Message* message); | 134 bool Send(IPC::Message* message); |
134 | 135 |
135 void SetAudioHardwareConfig(media::AudioHardwareConfig* hardware_config); | 136 void SetAudioHardwareConfig(media::AudioHardwareConfig* hardware_config); |
136 | 137 |
| 138 scoped_refptr<WebRtcAudioRenderer> CreateDefaultWebRtcAudioRenderer( |
| 139 int render_view_id); |
| 140 |
137 protected: | 141 protected: |
138 void InitializeIOThread(const char* thread_name); | 142 void InitializeIOThread(const char* thread_name); |
139 void UninitializeIOThread(); | 143 void UninitializeIOThread(); |
140 void CreateChannel(const char* name); | 144 void CreateChannel(const char* name); |
141 void DestroyChannel(); | 145 void DestroyChannel(); |
142 | 146 |
143 void OnGetAudioHardwareConfig(media::AudioParameters* input_params, | 147 void OnGetAudioHardwareConfig(media::AudioParameters* input_params, |
144 media::AudioParameters* output_params); | 148 media::AudioParameters* output_params); |
145 | 149 |
146 // IPC::Listener implementation. | 150 // IPC::Listener implementation. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; | 209 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; |
206 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; | 210 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; |
207 | 211 |
208 private: | 212 private: |
209 webrtc::VoENetwork* network_; | 213 webrtc::VoENetwork* network_; |
210 }; | 214 }; |
211 | 215 |
212 } // namespace content | 216 } // namespace content |
213 | 217 |
214 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 218 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
OLD | NEW |