Chromium Code Reviews| 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" |
| 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/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "content/browser/media/media_internals.h" | |
|
acolwell GONE FROM CHROMIUM
2013/11/22 19:12:48
nit: forward declare instead.
DaleCurtis
2013/11/22 20:33:33
Done.
| |
| 14 #include "content/browser/renderer_host/media/mock_media_observer.h" | 15 #include "content/browser/renderer_host/media/mock_media_observer.h" |
| 15 #include "content/public/renderer/content_renderer_client.h" | 16 #include "content/public/renderer/content_renderer_client.h" |
| 16 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
| 17 #include "media/base/audio_hardware_config.h" | 18 #include "media/base/audio_hardware_config.h" |
| 18 #include "media/base/channel_layout.h" | 19 #include "media/base/channel_layout.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "third_party/webrtc/common_types.h" | 21 #include "third_party/webrtc/common_types.h" |
| 21 | 22 |
| 22 namespace IPC { | 23 namespace IPC { |
| 23 class Channel; | 24 class Channel; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 media::AudioParameters* output_params); | 149 media::AudioParameters* output_params); |
| 149 | 150 |
| 150 // IPC::Listener implementation. | 151 // IPC::Listener implementation. |
| 151 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 152 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 152 | 153 |
| 153 // Posts a final task to the IO message loop and waits for completion. | 154 // Posts a final task to the IO message loop and waits for completion. |
| 154 void WaitForIOThreadCompletion(); | 155 void WaitForIOThreadCompletion(); |
| 155 void WaitForAudioManagerCompletion(); | 156 void WaitForAudioManagerCompletion(); |
| 156 void WaitForMessageLoopCompletion(base::MessageLoopProxy* loop); | 157 void WaitForMessageLoopCompletion(base::MessageLoopProxy* loop); |
| 157 | 158 |
| 158 // Convenience getter for gmock. | |
| 159 MockMediaInternals& media_observer() const { | |
| 160 return *media_internals_.get(); | |
| 161 } | |
| 162 | |
| 163 std::string GetTestDataPath(const base::FilePath::StringType& file_name); | 159 std::string GetTestDataPath(const base::FilePath::StringType& file_name); |
| 164 | 160 |
| 165 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; | 161 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; |
| 166 base::MessageLoopForUI message_loop_; | 162 base::MessageLoopForUI message_loop_; |
| 167 ContentRendererClient content_renderer_client_; | 163 ContentRendererClient content_renderer_client_; |
| 168 RenderThreadImpl* render_thread_; // Owned by mock_process_. | 164 RenderThreadImpl* render_thread_; // Owned by mock_process_. |
| 165 MediaInternals* media_internals_; | |
| 169 scoped_ptr<WebRTCMockRenderProcess> mock_process_; | 166 scoped_ptr<WebRTCMockRenderProcess> mock_process_; |
| 170 scoped_ptr<MockMediaInternals> media_internals_; | |
| 171 scoped_ptr<MediaStreamManager> media_stream_manager_; | 167 scoped_ptr<MediaStreamManager> media_stream_manager_; |
| 172 scoped_ptr<media::AudioManager> audio_manager_; | 168 scoped_ptr<media::AudioManager> audio_manager_; |
| 173 scoped_ptr<AudioMirroringManager> mirroring_manager_; | 169 scoped_ptr<AudioMirroringManager> mirroring_manager_; |
| 174 scoped_ptr<net::URLRequestContext> test_request_context_; | 170 scoped_ptr<net::URLRequestContext> test_request_context_; |
| 175 scoped_ptr<ResourceContext> resource_context_; | 171 scoped_ptr<ResourceContext> resource_context_; |
| 176 scoped_ptr<IPC::Channel> channel_; | 172 scoped_ptr<IPC::Channel> channel_; |
| 177 scoped_refptr<TestAudioRendererHost> audio_render_host_; | 173 scoped_refptr<TestAudioRendererHost> audio_render_host_; |
| 178 scoped_refptr<TestAudioInputRendererHost> audio_input_renderer_host_; | 174 scoped_refptr<TestAudioInputRendererHost> audio_input_renderer_host_; |
| 179 | 175 |
| 180 media::AudioHardwareConfig* audio_hardware_config_; // Weak reference. | 176 media::AudioHardwareConfig* audio_hardware_config_; // Weak reference. |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 209 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; | 205 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; |
| 210 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; | 206 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; |
| 211 | 207 |
| 212 private: | 208 private: |
| 213 webrtc::VoENetwork* network_; | 209 webrtc::VoENetwork* network_; |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 } // namespace content | 212 } // namespace content |
| 217 | 213 |
| 218 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 214 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
| OLD | NEW |