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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // If we do, we will crash the test process. | 335 // If we do, we will crash the test process. |
336 ADD_FAILURE() << "Failed to wait for message loop"; | 336 ADD_FAILURE() << "Failed to wait for message loop"; |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 std::string WebRTCAudioDeviceTest::GetTestDataPath( | 340 std::string WebRTCAudioDeviceTest::GetTestDataPath( |
341 const base::FilePath::StringType& file_name) { | 341 const base::FilePath::StringType& file_name) { |
342 base::FilePath path; | 342 base::FilePath path; |
343 EXPECT_TRUE(PathService::Get(DIR_TEST_DATA, &path)); | 343 EXPECT_TRUE(PathService::Get(DIR_TEST_DATA, &path)); |
344 path = path.Append(file_name); | 344 path = path.Append(file_name); |
345 EXPECT_TRUE(file_util::PathExists(path)); | 345 EXPECT_TRUE(base::PathExists(path)); |
346 #if defined(OS_WIN) | 346 #if defined(OS_WIN) |
347 return WideToUTF8(path.value()); | 347 return WideToUTF8(path.value()); |
348 #else | 348 #else |
349 return path.value(); | 349 return path.value(); |
350 #endif | 350 #endif |
351 } | 351 } |
352 | 352 |
353 WebRTCTransportImpl::WebRTCTransportImpl(webrtc::VoENetwork* network) | 353 WebRTCTransportImpl::WebRTCTransportImpl(webrtc::VoENetwork* network) |
354 : network_(network) { | 354 : network_(network) { |
355 } | 355 } |
356 | 356 |
357 WebRTCTransportImpl::~WebRTCTransportImpl() {} | 357 WebRTCTransportImpl::~WebRTCTransportImpl() {} |
358 | 358 |
359 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { | 359 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { |
360 return network_->ReceivedRTPPacket(channel, data, len); | 360 return network_->ReceivedRTPPacket(channel, data, len); |
361 } | 361 } |
362 | 362 |
363 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, | 363 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, |
364 int len) { | 364 int len) { |
365 return network_->ReceivedRTCPPacket(channel, data, len); | 365 return network_->ReceivedRTCPPacket(channel, data, len); |
366 } | 366 } |
367 | 367 |
368 } // namespace content | 368 } // namespace content |
OLD | NEW |