| 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" | |
| 14 #include "content/browser/renderer_host/media/mock_media_observer.h" | 13 #include "content/browser/renderer_host/media/mock_media_observer.h" |
| 15 #include "content/public/renderer/content_renderer_client.h" | 14 #include "content/public/renderer/content_renderer_client.h" |
| 16 #include "ipc/ipc_listener.h" | 15 #include "ipc/ipc_listener.h" |
| 17 #include "media/base/audio_hardware_config.h" | 16 #include "media/base/audio_hardware_config.h" |
| 18 #include "media/base/channel_layout.h" | 17 #include "media/base/channel_layout.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "third_party/webrtc/common_types.h" | 19 #include "third_party/webrtc/common_types.h" |
| 21 | 20 |
| 22 namespace IPC { | 21 namespace IPC { |
| 23 class Channel; | 22 class Channel; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 145 |
| 147 void OnGetAudioHardwareConfig(media::AudioParameters* input_params, | 146 void OnGetAudioHardwareConfig(media::AudioParameters* input_params, |
| 148 media::AudioParameters* output_params); | 147 media::AudioParameters* output_params); |
| 149 | 148 |
| 150 // IPC::Listener implementation. | 149 // IPC::Listener implementation. |
| 151 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 150 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 152 | 151 |
| 153 // Posts a final task to the IO message loop and waits for completion. | 152 // Posts a final task to the IO message loop and waits for completion. |
| 154 void WaitForIOThreadCompletion(); | 153 void WaitForIOThreadCompletion(); |
| 155 void WaitForAudioManagerCompletion(); | 154 void WaitForAudioManagerCompletion(); |
| 156 void WaitForMessageLoopCompletion(base::MessageLoopProxy* loop); | 155 void WaitForTaskRunnerCompletion( |
| 156 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 157 | 157 |
| 158 // Convenience getter for gmock. | 158 // Convenience getter for gmock. |
| 159 MockMediaInternals& media_observer() const { | 159 MockMediaInternals& media_observer() const { |
| 160 return *media_internals_.get(); | 160 return *media_internals_.get(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 std::string GetTestDataPath(const base::FilePath::StringType& file_name); | 163 std::string GetTestDataPath(const base::FilePath::StringType& file_name); |
| 164 | 164 |
| 165 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; | 165 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; |
| 166 base::MessageLoopForUI message_loop_; | 166 base::MessageLoopForUI message_loop_; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; | 209 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; |
| 210 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; | 210 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; |
| 211 | 211 |
| 212 private: | 212 private: |
| 213 webrtc::VoENetwork* network_; | 213 webrtc::VoENetwork* network_; |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 } // namespace content | 216 } // namespace content |
| 217 | 217 |
| 218 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ | 218 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ |
| OLD | NEW |