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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "content/browser/renderer_host/media/mock_media_observer.h" | 15 #include "content/browser/renderer_host/media/mock_media_observer.h" |
16 #include "content/renderer/mock_content_renderer_client.h" | 16 #include "content/renderer/mock_content_renderer_client.h" |
17 #include "media/base/channel_layout.h" | 17 #include "media/base/channel_layout.h" |
18 #include "ipc/ipc_channel.h" | 18 #include "ipc/ipc_channel.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/webrtc/common_types.h" | 20 #include "third_party/webrtc/common_types.h" |
21 | 21 |
22 class AudioInputRendererHost; | 22 class AudioInputRendererHost; |
23 class AudioManager; | |
24 class AudioRendererHost; | 23 class AudioRendererHost; |
25 class RenderThreadImpl; | 24 class RenderThreadImpl; |
26 class WebRTCMockRenderProcess; | 25 class WebRTCMockRenderProcess; |
27 | 26 |
28 namespace base { | 27 namespace base { |
29 namespace win { | 28 namespace win { |
30 class ScopedCOMInitializer; | 29 class ScopedCOMInitializer; |
31 } | 30 } |
32 } | 31 } |
33 | 32 |
34 namespace content { | 33 namespace content { |
35 class ContentRendererClient; | 34 class ContentRendererClient; |
36 class MockResourceContext; | 35 class MockResourceContext; |
37 class ResourceContext; | 36 class ResourceContext; |
38 class TestBrowserThread; | 37 class TestBrowserThread; |
39 } | 38 } |
40 | 39 |
| 40 namespace media { |
| 41 class AudioManager; |
| 42 } |
| 43 |
41 namespace media_stream { | 44 namespace media_stream { |
42 class MediaStreamManager; | 45 class MediaStreamManager; |
43 } | 46 } |
44 | 47 |
45 namespace net { | 48 namespace net { |
46 class URLRequestContext; | 49 class URLRequestContext; |
47 } | 50 } |
48 | 51 |
49 namespace webrtc { | 52 namespace webrtc { |
50 class VoENetwork; | 53 class VoENetwork; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 162 |
160 std::string GetTestDataPath(const FilePath::StringType& file_name); | 163 std::string GetTestDataPath(const FilePath::StringType& file_name); |
161 | 164 |
162 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; | 165 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; |
163 MessageLoopForUI message_loop_; | 166 MessageLoopForUI message_loop_; |
164 content::MockContentRendererClient mock_content_renderer_client_; | 167 content::MockContentRendererClient mock_content_renderer_client_; |
165 RenderThreadImpl* render_thread_; // Owned by mock_process_. | 168 RenderThreadImpl* render_thread_; // Owned by mock_process_. |
166 scoped_ptr<WebRTCMockRenderProcess> mock_process_; | 169 scoped_ptr<WebRTCMockRenderProcess> mock_process_; |
167 scoped_ptr<MockMediaObserver> media_observer_; | 170 scoped_ptr<MockMediaObserver> media_observer_; |
168 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; | 171 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; |
169 scoped_ptr<AudioManager> audio_manager_; | 172 scoped_ptr<media::AudioManager> audio_manager_; |
170 scoped_ptr<content::MockResourceContext> resource_context_; | 173 scoped_ptr<content::MockResourceContext> resource_context_; |
171 scoped_refptr<net::URLRequestContext> test_request_context_; | 174 scoped_refptr<net::URLRequestContext> test_request_context_; |
172 scoped_ptr<IPC::Channel> channel_; | 175 scoped_ptr<IPC::Channel> channel_; |
173 scoped_refptr<AudioRendererHost> audio_render_host_; | 176 scoped_refptr<AudioRendererHost> audio_render_host_; |
174 scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; | 177 scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; |
175 | 178 |
176 AudioUtilInterface* audio_util_callback_; // Weak reference. | 179 AudioUtilInterface* audio_util_callback_; // Weak reference. |
177 | 180 |
178 // Initialized on the main test thread that we mark as the UI thread. | 181 // Initialized on the main test thread that we mark as the UI thread. |
179 scoped_ptr<content::TestBrowserThread> ui_thread_; | 182 scoped_ptr<content::TestBrowserThread> ui_thread_; |
(...skipping 12 matching lines...) Expand all Loading... |
192 virtual ~WebRTCTransportImpl(); | 195 virtual ~WebRTCTransportImpl(); |
193 | 196 |
194 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; | 197 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; |
195 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; | 198 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; |
196 | 199 |
197 private: | 200 private: |
198 webrtc::VoENetwork* network_; | 201 webrtc::VoENetwork* network_; |
199 }; | 202 }; |
200 | 203 |
201 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 204 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
OLD | NEW |