| 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/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "content/browser/renderer_host/media/mock_media_observer.h" | 14 #include "content/browser/renderer_host/media/mock_media_observer.h" |
| 15 #include "content/public/renderer/content_renderer_client.h" | 15 #include "content/public/renderer/content_renderer_client.h" |
| 16 #include "media/base/channel_layout.h" | 16 #include "media/base/channel_layout.h" |
| 17 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "third_party/webrtc/common_types.h" | 19 #include "third_party/webrtc/common_types.h" |
| 20 | 20 |
| 21 namespace media { | 21 namespace media { |
| 22 class AudioManager; | 22 class AudioManager; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace media_stream { | |
| 26 class MediaStreamManager; | |
| 27 } | |
| 28 | |
| 29 namespace net { | 25 namespace net { |
| 30 class URLRequestContext; | 26 class URLRequestContext; |
| 31 } | 27 } |
| 32 | 28 |
| 33 namespace webrtc { | 29 namespace webrtc { |
| 34 class VoENetwork; | 30 class VoENetwork; |
| 35 } | 31 } |
| 36 | 32 |
| 37 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 38 namespace base { | 34 namespace base { |
| 39 namespace win { | 35 namespace win { |
| 40 class ScopedCOMInitializer; | 36 class ScopedCOMInitializer; |
| 41 } | 37 } |
| 42 } | 38 } |
| 43 #endif | 39 #endif |
| 44 | 40 |
| 45 namespace content { | 41 namespace content { |
| 46 | 42 |
| 47 class AudioInputRendererHost; | 43 class AudioInputRendererHost; |
| 48 class AudioRendererHost; | 44 class AudioRendererHost; |
| 49 class ContentRendererClient; | 45 class ContentRendererClient; |
| 46 class MediaStreamManager; |
| 50 class MockResourceContext; | 47 class MockResourceContext; |
| 51 class RenderThreadImpl; | 48 class RenderThreadImpl; |
| 52 class ResourceContext; | 49 class ResourceContext; |
| 53 class TestBrowserThread; | 50 class TestBrowserThread; |
| 54 class WebRTCMockRenderProcess; | 51 class WebRTCMockRenderProcess; |
| 55 | 52 |
| 56 // Scoped class for WebRTC interfaces. Fetches the wrapped interface | 53 // Scoped class for WebRTC interfaces. Fetches the wrapped interface |
| 57 // in the constructor via WebRTC's GetInterface mechanism and then releases | 54 // in the constructor via WebRTC's GetInterface mechanism and then releases |
| 58 // the reference in the destructor. | 55 // the reference in the destructor. |
| 59 template<typename T> | 56 template<typename T> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 156 } |
| 160 | 157 |
| 161 std::string GetTestDataPath(const FilePath::StringType& file_name); | 158 std::string GetTestDataPath(const FilePath::StringType& file_name); |
| 162 | 159 |
| 163 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; | 160 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; |
| 164 MessageLoopForUI message_loop_; | 161 MessageLoopForUI message_loop_; |
| 165 content::ContentRendererClient content_renderer_client_; | 162 content::ContentRendererClient content_renderer_client_; |
| 166 RenderThreadImpl* render_thread_; // Owned by mock_process_. | 163 RenderThreadImpl* render_thread_; // Owned by mock_process_. |
| 167 scoped_ptr<WebRTCMockRenderProcess> mock_process_; | 164 scoped_ptr<WebRTCMockRenderProcess> mock_process_; |
| 168 scoped_ptr<MockMediaObserver> media_observer_; | 165 scoped_ptr<MockMediaObserver> media_observer_; |
| 169 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; | 166 scoped_ptr<MediaStreamManager> media_stream_manager_; |
| 170 scoped_ptr<media::AudioManager> audio_manager_; | 167 scoped_ptr<media::AudioManager> audio_manager_; |
| 171 scoped_ptr<net::URLRequestContext> test_request_context_; | 168 scoped_ptr<net::URLRequestContext> test_request_context_; |
| 172 scoped_ptr<content::ResourceContext> resource_context_; | 169 scoped_ptr<content::ResourceContext> resource_context_; |
| 173 scoped_ptr<IPC::Channel> channel_; | 170 scoped_ptr<IPC::Channel> channel_; |
| 174 scoped_refptr<AudioRendererHost> audio_render_host_; | 171 scoped_refptr<AudioRendererHost> audio_render_host_; |
| 175 scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; | 172 scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; |
| 176 | 173 |
| 177 AudioUtilInterface* audio_util_callback_; // Weak reference. | 174 AudioUtilInterface* audio_util_callback_; // Weak reference. |
| 178 | 175 |
| 179 // Initialized on the main test thread that we mark as the UI thread. | 176 // Initialized on the main test thread that we mark as the UI thread. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 206 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; | 203 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; |
| 207 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; | 204 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; |
| 208 | 205 |
| 209 private: | 206 private: |
| 210 webrtc::VoENetwork* network_; | 207 webrtc::VoENetwork* network_; |
| 211 }; | 208 }; |
| 212 | 209 |
| 213 } // namespace content | 210 } // namespace content |
| 214 | 211 |
| 215 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 212 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
| OLD | NEW |