Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 class ScopedCOMInitializer; | 28 class ScopedCOMInitializer; |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 class ContentRendererClient; | 33 class ContentRendererClient; |
| 34 class ResourceContext; | 34 class ResourceContext; |
| 35 class TestBrowserThread; | 35 class TestBrowserThread; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace media_stream { | |
| 39 class MediaStreamManager; | |
| 40 } | |
| 41 | |
| 38 namespace net { | 42 namespace net { |
| 39 class URLRequestContext; | 43 class URLRequestContext; |
| 40 } | 44 } |
| 41 | 45 |
| 42 namespace webrtc { | 46 namespace webrtc { |
| 43 class VoENetwork; | 47 class VoENetwork; |
| 44 } | 48 } |
| 45 | 49 |
| 46 // Scoped class for WebRTC interfaces. Fetches the wrapped interface | 50 // Scoped class for WebRTC interfaces. Fetches the wrapped interface |
| 47 // in the constructor via WebRTC's GetInterface mechanism and then releases | 51 // in the constructor via WebRTC's GetInterface mechanism and then releases |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 | 166 |
| 163 std::string GetTestDataPath(const FilePath::StringType& file_name); | 167 std::string GetTestDataPath(const FilePath::StringType& file_name); |
| 164 | 168 |
| 165 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; | 169 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; |
| 166 MessageLoopForUI message_loop_; | 170 MessageLoopForUI message_loop_; |
| 167 content::MockContentRendererClient mock_content_renderer_client_; | 171 content::MockContentRendererClient mock_content_renderer_client_; |
| 168 RenderThreadImpl* render_thread_; // Owned by mock_process_. | 172 RenderThreadImpl* render_thread_; // Owned by mock_process_. |
| 169 scoped_ptr<WebRTCMockRenderProcess> mock_process_; | 173 scoped_ptr<WebRTCMockRenderProcess> mock_process_; |
| 170 base::WaitableEvent event_; | 174 base::WaitableEvent event_; |
| 171 scoped_ptr<MockMediaObserver> media_observer_; | 175 scoped_ptr<MockMediaObserver> media_observer_; |
| 176 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; | |
|
henrika (OOO until Aug 14)
2011/11/11 11:05:42
Why needed now when adding input?
| |
| 172 scoped_ptr<content::ResourceContext> resource_context_; | 177 scoped_ptr<content::ResourceContext> resource_context_; |
| 173 scoped_refptr<net::URLRequestContext> test_request_context_; | 178 scoped_refptr<net::URLRequestContext> test_request_context_; |
| 174 scoped_ptr<IPC::Channel> channel_; | 179 scoped_ptr<IPC::Channel> channel_; |
| 175 scoped_refptr<AudioRendererHost> audio_render_host_; | 180 scoped_refptr<AudioRendererHost> audio_render_host_; |
| 181 scoped_refptr<AudioInputRendererHost> audio_input_renderer_host_; | |
| 182 | |
| 176 AudioUtilInterface* audio_util_callback_; // Weak reference. | 183 AudioUtilInterface* audio_util_callback_; // Weak reference. |
| 177 | 184 |
| 178 // Initialized on the main test thread that we mark as the UI thread. | 185 // Initialized on the main test thread that we mark as the UI thread. |
| 179 scoped_ptr<content::TestBrowserThread> ui_thread_; | 186 scoped_ptr<content::TestBrowserThread> ui_thread_; |
| 180 // Initialized on our IO thread to satisfy BrowserThread::IO checks. | 187 // Initialized on our IO thread to satisfy BrowserThread::IO checks. |
| 181 scoped_ptr<content::TestBrowserThread> io_thread_; | 188 scoped_ptr<content::TestBrowserThread> io_thread_; |
| 182 // COM initialization on the IO thread for Windows. | 189 // COM initialization on the IO thread for Windows. |
| 183 scoped_ptr<base::win::ScopedCOMInitializer> initialize_com_; | 190 scoped_ptr<base::win::ScopedCOMInitializer> initialize_com_; |
| 184 }; | 191 }; |
| 185 | 192 |
| 186 // A very basic implementation of webrtc::Transport that acts as a transport | 193 // A very basic implementation of webrtc::Transport that acts as a transport |
| 187 // but just forwards all calls to a local webrtc::VoENetwork implementation. | 194 // but just forwards all calls to a local webrtc::VoENetwork implementation. |
| 188 // Ownership of the VoENetwork object lies outside the class. | 195 // Ownership of the VoENetwork object lies outside the class. |
| 189 class WebRTCTransportImpl : public webrtc::Transport { | 196 class WebRTCTransportImpl : public webrtc::Transport { |
| 190 public: | 197 public: |
| 191 explicit WebRTCTransportImpl(webrtc::VoENetwork* network); | 198 explicit WebRTCTransportImpl(webrtc::VoENetwork* network); |
| 192 virtual ~WebRTCTransportImpl(); | 199 virtual ~WebRTCTransportImpl(); |
| 193 | 200 |
| 194 virtual int SendPacket(int channel, const void* data, int len); | 201 virtual int SendPacket(int channel, const void* data, int len); |
| 195 virtual int SendRTCPPacket(int channel, const void* data, int len); | 202 virtual int SendRTCPPacket(int channel, const void* data, int len); |
| 196 | 203 |
| 197 private: | 204 private: |
| 198 webrtc::VoENetwork* network_; | 205 webrtc::VoENetwork* network_; |
| 199 }; | 206 }; |
| 200 | 207 |
| 201 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 208 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
| OLD | NEW |