| 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 #include "content/test/webrtc_audio_device_test.h" | 5 #include "content/test/webrtc_audio_device_test.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // We initialize COM (STA) on our IO thread as is done in Chrome. | 198 // We initialize COM (STA) on our IO thread as is done in Chrome. |
| 199 // See BrowserProcessSubThread::Init. | 199 // See BrowserProcessSubThread::Init. |
| 200 initialize_com_.reset(new base::win::ScopedCOMInitializer()); | 200 initialize_com_.reset(new base::win::ScopedCOMInitializer()); |
| 201 #endif | 201 #endif |
| 202 | 202 |
| 203 // Set the current thread as the IO thread. | 203 // Set the current thread as the IO thread. |
| 204 io_thread_.reset(new TestBrowserThread(BrowserThread::IO, | 204 io_thread_.reset(new TestBrowserThread(BrowserThread::IO, |
| 205 MessageLoop::current())); | 205 MessageLoop::current())); |
| 206 | 206 |
| 207 // Populate our resource context. | 207 // Populate our resource context. |
| 208 test_request_context_.reset(new net::TestURLRequestContext()); | 208 test_request_context_.reset(new TestURLRequestContext()); |
| 209 MockRTCResourceContext* resource_context = | 209 MockRTCResourceContext* resource_context = |
| 210 static_cast<MockRTCResourceContext*>(resource_context_.get()); | 210 static_cast<MockRTCResourceContext*>(resource_context_.get()); |
| 211 resource_context->set_request_context(test_request_context_.get()); | 211 resource_context->set_request_context(test_request_context_.get()); |
| 212 media_observer_.reset(new MockMediaObserver()); | 212 media_observer_.reset(new MockMediaObserver()); |
| 213 | 213 |
| 214 has_input_devices_ = audio_manager_->HasAudioInputDevices(); | 214 has_input_devices_ = audio_manager_->HasAudioInputDevices(); |
| 215 has_output_devices_ = audio_manager_->HasAudioOutputDevices(); | 215 has_output_devices_ = audio_manager_->HasAudioOutputDevices(); |
| 216 | 216 |
| 217 // Create an IPC channel that handles incoming messages on the IO thread. | 217 // Create an IPC channel that handles incoming messages on the IO thread. |
| 218 CreateChannel(thread_name); | 218 CreateChannel(thread_name); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { | 366 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { |
| 367 return network_->ReceivedRTPPacket(channel, data, len); | 367 return network_->ReceivedRTPPacket(channel, data, len); |
| 368 } | 368 } |
| 369 | 369 |
| 370 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, | 370 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, |
| 371 int len) { | 371 int len) { |
| 372 return network_->ReceivedRTCPPacket(channel, data, len); | 372 return network_->ReceivedRTCPPacket(channel, data, len); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace content | 375 } // namespace content |
| OLD | NEW |