summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/BUILD.gn9
-rw-r--r--content/browser/renderer_host/p2p/socket_dispatcher_host.cc2
-rw-r--r--content/browser/renderer_host/p2p/socket_dispatcher_host.h4
-rw-r--r--content/browser/renderer_host/p2p/socket_host.cc26
-rw-r--r--content/browser/renderer_host/p2p/socket_host.h6
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp.cc8
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp.h8
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp_server.cc2
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp_server.h2
-rw-r--r--content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc20
-rw-r--r--content/browser/renderer_host/p2p/socket_host_throttler.cc12
-rw-r--r--content/browser/renderer_host/p2p/socket_host_throttler.h8
-rw-r--r--content/browser/renderer_host/p2p/socket_host_udp.cc6
-rw-r--r--content/browser/renderer_host/p2p/socket_host_udp.h8
-rw-r--r--content/browser/renderer_host/p2p/socket_host_udp_unittest.cc20
-rw-r--r--content/browser/renderer_host/p2p/socket_host_unittest.cc6
-rw-r--r--content/common/p2p_messages.h14
-rw-r--r--content/renderer/media/media_stream_audio_processor_unittest.cc16
-rw-r--r--content/renderer/media/mock_peer_connection_impl.cc20
-rw-r--r--content/renderer/media/mock_peer_connection_impl.h12
-rw-r--r--content/renderer/media/peer_connection_identity_service.h2
-rw-r--r--content/renderer/media/peer_connection_tracker.cc4
-rw-r--r--content/renderer/media/rtc_data_channel_handler.cc4
-rw-r--r--content/renderer/media/rtc_peer_connection_handler.cc28
-rw-r--r--content/renderer/media/rtc_peer_connection_handler.h6
-rw-r--r--content/renderer/media/rtc_peer_connection_handler_unittest.cc12
-rw-r--r--content/renderer/media/webrtc/media_stream_remote_video_source.cc2
-rw-r--r--content/renderer/media/webrtc/media_stream_track_metrics.cc6
-rw-r--r--content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc6
-rw-r--r--content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc20
-rw-r--r--content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h4
-rw-r--r--content/renderer/media/webrtc/peer_connection_dependency_factory.cc16
-rw-r--r--content/renderer/media/webrtc/peer_connection_dependency_factory.h8
-rw-r--r--content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc6
-rw-r--r--content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h4
-rw-r--r--content/renderer/media/webrtc_audio_capturer.cc2
-rw-r--r--content/renderer/media/webrtc_audio_renderer_unittest.cc2
-rw-r--r--content/renderer/media/webrtc_logging.cc4
-rw-r--r--content/renderer/p2p/host_address_request.cc4
-rw-r--r--content/renderer/p2p/host_address_request.h8
-rw-r--r--content/renderer/p2p/ipc_network_manager.cc42
-rw-r--r--content/renderer/p2p/ipc_network_manager.h4
-rw-r--r--content/renderer/p2p/ipc_socket_factory.cc138
-rw-r--r--content/renderer/p2p/ipc_socket_factory.h24
-rw-r--r--content/renderer/p2p/port_allocator.cc8
-rw-r--r--content/renderer/p2p/port_allocator.h6
-rw-r--r--content/renderer/p2p/socket_client.h4
-rw-r--r--content/renderer/p2p/socket_client_impl.cc4
-rw-r--r--content/renderer/p2p/socket_client_impl.h2
-rw-r--r--content/renderer/pepper/pepper_media_stream_video_track_host.cc2
50 files changed, 296 insertions, 295 deletions
diff --git a/content/BUILD.gn b/content/BUILD.gn
index a49a887..a2bd489 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -81,17 +81,18 @@ config("libjingle_stub_config") {
]
if (is_mac) {
- defines += [ "OSX" ]
+ defines += [ "OSX", "WEBRTC_MAC" ]
} else if (is_linux) {
- defines += [ "LINUX" ]
+ defines += [ "LINUX", "WEBRTC_LINUX" ]
} else if (is_android) {
- defines += [ "ANDROID" ]
+ defines += [ "ANDROID", "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
} else if (is_win) {
libs = [ "secur32.lib", "crypt32.lib", "iphlpapi.lib" ]
+ defines += [ "WEBRTC_WIN" ]
}
if (is_posix) {
- defines += [ "POSIX" ]
+ defines += [ "POSIX", "WEBRTC_POSIX" ]
}
if (is_chromeos) {
defines += [ "CHROMEOS" ]
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
index bb8c1fb..8bab6af 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
@@ -269,7 +269,7 @@ void P2PSocketDispatcherHost::OnAcceptIncomingTcpConnection(
void P2PSocketDispatcherHost::OnSend(int socket_id,
const net::IPEndPoint& socket_address,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) {
P2PSocketHost* socket = LookupSocket(socket_id);
if (!socket) {
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.h b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
index 21376bd..11045f56 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.h
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
@@ -22,7 +22,7 @@ namespace net {
class URLRequestContextGetter;
}
-namespace talk_base {
+namespace rtc {
struct PacketOptions;
}
@@ -84,7 +84,7 @@ class P2PSocketDispatcherHost
void OnSend(int socket_id,
const net::IPEndPoint& socket_address,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id);
void OnSetOption(int socket_id, P2PSocketOption option, int value);
void OnDestroySocket(int socket_id);
diff --git a/content/browser/renderer_host/p2p/socket_host.cc b/content/browser/renderer_host/p2p/socket_host.cc
index 5fc3818..fd26298 100644
--- a/content/browser/renderer_host/p2p/socket_host.cc
+++ b/content/browser/renderer_host/p2p/socket_host.cc
@@ -11,10 +11,10 @@
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/hmac.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
-#include "third_party/libjingle/source/talk/base/byteorder.h"
-#include "third_party/libjingle/source/talk/base/messagedigest.h"
#include "third_party/libjingle/source/talk/p2p/base/stun.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/byteorder.h"
+#include "third_party/webrtc/base/messagedigest.h"
namespace {
@@ -48,7 +48,7 @@ bool IsRtcpPacket(const char* data) {
}
bool IsTurnSendIndicationPacket(const char* data) {
- uint16 type = talk_base::GetBE16(data);
+ uint16 type = rtc::GetBE16(data);
return (type == cricket::TURN_SEND_INDICATION);
}
@@ -80,7 +80,7 @@ bool ValidateRtpHeader(const char* rtp, int length, size_t* header_length) {
// Getting extension profile length.
// Length is in 32 bit words.
- uint16 extn_length = talk_base::GetBE16(rtp + 2) * 4;
+ uint16 extn_length = rtc::GetBE16(rtp + 2) * 4;
// Verify input length against total header size.
if (rtp_hdr_len_without_extn + kRtpExtnHdrLen + extn_length > length) {
@@ -129,7 +129,7 @@ void UpdateAbsSendTimeExtnValue(char* extn_data, int len,
// Assumes |len| is actual packet length + tag length. Updates HMAC at end of
// the RTP packet.
void UpdateRtpAuthTag(char* rtp, int len,
- const talk_base::PacketOptions& options) {
+ const rtc::PacketOptions& options) {
// If there is no key, return.
if (options.packet_time_params.srtp_auth_key.empty())
return;
@@ -176,7 +176,7 @@ namespace content {
namespace packet_processing_helpers {
bool ApplyPacketOptions(char* data, int length,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint32 abs_send_time) {
DCHECK(data != NULL);
DCHECK(length > 0);
@@ -239,7 +239,7 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
}
rtp_begin = kTurnChannelHdrLen;
- rtp_length = talk_base::GetBE16(&packet[2]);
+ rtp_length = rtc::GetBE16(&packet[2]);
if (length < rtp_length + kTurnChannelHdrLen) {
return false;
}
@@ -249,7 +249,7 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
return false;
}
// Validate STUN message length.
- int stun_msg_len = talk_base::GetBE16(&packet[2]);
+ int stun_msg_len = rtc::GetBE16(&packet[2]);
if (stun_msg_len + P2PSocketHost::kStunHeaderSize != length) {
return false;
}
@@ -275,8 +275,8 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
// padding bits are ignored, and may be any value.
uint16 attr_type, attr_length;
// Getting attribute type and length.
- attr_type = talk_base::GetBE16(&packet[rtp_begin]);
- attr_length = talk_base::GetBE16(
+ attr_type = rtc::GetBE16(&packet[rtp_begin]);
+ attr_length = rtc::GetBE16(
&packet[rtp_begin + sizeof(attr_type)]);
// Checking for bogus attribute length.
if (length < attr_length + rtp_begin) {
@@ -353,9 +353,9 @@ bool UpdateRtpAbsSendTimeExtn(char* rtp, int length,
rtp += rtp_hdr_len_without_extn;
// Getting extension profile ID and length.
- uint16 profile_id = talk_base::GetBE16(rtp);
+ uint16 profile_id = rtc::GetBE16(rtp);
// Length is in 32 bit words.
- uint16 extn_length = talk_base::GetBE16(rtp + 2) * 4;
+ uint16 extn_length = rtc::GetBE16(rtp + 2) * 4;
rtp += kRtpExtnHdrLen; // Moving past extn header.
diff --git a/content/browser/renderer_host/p2p/socket_host.h b/content/browser/renderer_host/p2p/socket_host.h
index bfcbbd2..86eff5d 100644
--- a/content/browser/renderer_host/p2p/socket_host.h
+++ b/content/browser/renderer_host/p2p/socket_host.h
@@ -20,7 +20,7 @@ namespace net {
class URLRequestContextGetter;
}
-namespace talk_base {
+namespace rtc {
struct PacketOptions;
}
@@ -34,7 +34,7 @@ namespace packet_processing_helpers {
// if present with current time and 2. update HMAC in RTP packet.
// If abs_send_time is 0, ApplyPacketOption will get current time from system.
CONTENT_EXPORT bool ApplyPacketOptions(char* data, int length,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint32 abs_send_time);
// Helper method which finds RTP ofset and length if the packet is encapsulated
@@ -70,7 +70,7 @@ class CONTENT_EXPORT P2PSocketHost {
// Sends |data| on the socket to |to|.
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) = 0;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index a5aac2f..2955b61 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -18,7 +18,7 @@
#include "net/socket/tcp_client_socket.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
namespace {
@@ -330,7 +330,7 @@ void P2PSocketHostTcpBase::OnPacket(const std::vector<char>& data) {
// but may be honored in the future.
void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) {
if (!socket_) {
// The Send message may be sent after the an OnError message was
@@ -490,7 +490,7 @@ int P2PSocketHostTcp::ProcessInput(char* input, int input_len) {
void P2PSocketHostTcp::DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) {
+ const rtc::PacketOptions& options) {
int size = kPacketHeaderSize + data.size();
scoped_refptr<net::DrainableIOBuffer> buffer =
new net::DrainableIOBuffer(new net::IOBuffer(size), size);
@@ -543,7 +543,7 @@ int P2PSocketHostStunTcp::ProcessInput(char* input, int input_len) {
void P2PSocketHostStunTcp::DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) {
+ const rtc::PacketOptions& options) {
// Each packet is expected to have header (STUN/TURN ChannelData), where
// header contains message type and and length of message.
if (data.size() < kPacketHeaderSize + kPacketLengthOffset) {
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.h b/content/browser/renderer_host/p2p/socket_host_tcp.h
index f5ff8633..005bebb 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.h
@@ -42,7 +42,7 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;
@@ -53,7 +53,7 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
virtual int ProcessInput(char* input, int input_len) = 0;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) = 0;
+ const rtc::PacketOptions& options) = 0;
void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer);
void OnPacket(const std::vector<char>& data);
@@ -110,7 +110,7 @@ class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHostTcpBase {
virtual int ProcessInput(char* input, int input_len) OVERRIDE;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) OVERRIDE;
+ const rtc::PacketOptions& options) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp);
};
@@ -132,7 +132,7 @@ class CONTENT_EXPORT P2PSocketHostStunTcp : public P2PSocketHostTcpBase {
virtual int ProcessInput(char* input, int input_len) OVERRIDE;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) OVERRIDE;
+ const rtc::PacketOptions& options) OVERRIDE;
private:
int GetExpectedPacketSize(const char* data, int len, int* pad_bytes);
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.cc b/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
index f3c4290..1017828 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
@@ -119,7 +119,7 @@ void P2PSocketHostTcpServer::OnAccepted(int result) {
void P2PSocketHostTcpServer::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) {
NOTREACHED();
OnError();
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.h b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
index e050b00..72ce6443 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
@@ -38,7 +38,7 @@ class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
index 24b77c3..f2d6146 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
@@ -89,7 +89,7 @@ TEST_F(P2PSocketHostTcpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@@ -121,7 +121,7 @@ TEST_F(P2PSocketHostTcpTest, ReceiveStun) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@@ -168,7 +168,7 @@ TEST_F(P2PSocketHostTcpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest_.ip_address, packet, options, 0);
@@ -194,7 +194,7 @@ TEST_F(P2PSocketHostTcpTest, SendAfterStunRequest) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
socket_->AppendInputData(&received_data[0], received_data.size());
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
// Now we should be able to send any data to |dest_|.
std::vector<char> packet;
CreateRandomPacket(&packet);
@@ -218,7 +218,7 @@ TEST_F(P2PSocketHostTcpTest, AsyncWrites) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
@@ -254,7 +254,7 @@ TEST_F(P2PSocketHostTcpTest, SendDataWithPacketOptions) {
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
socket_->AppendInputData(&received_data[0], received_data.size());
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
options.packet_time_params.rtp_sendtime_extension_id = 3;
// Now we should be able to send any data to |dest_|.
std::vector<char> packet;
@@ -278,7 +278,7 @@ TEST_F(P2PSocketHostStunTcpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@@ -307,7 +307,7 @@ TEST_F(P2PSocketHostStunTcpTest, ReceiveStun) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
@@ -351,7 +351,7 @@ TEST_F(P2PSocketHostStunTcpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest_.ip_address, packet, options, 0);
@@ -370,7 +370,7 @@ TEST_F(P2PSocketHostStunTcpTest, AsyncWrites) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest_.ip_address, packet1, options, 0);
diff --git a/content/browser/renderer_host/p2p/socket_host_throttler.cc b/content/browser/renderer_host/p2p/socket_host_throttler.cc
index 50a4dd0..0ef92eb 100644
--- a/content/browser/renderer_host/p2p/socket_host_throttler.cc
+++ b/content/browser/renderer_host/p2p/socket_host_throttler.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "content/browser/renderer_host/p2p/socket_host_throttler.h"
-#include "third_party/libjingle/source/talk/base/ratelimiter.h"
-#include "third_party/libjingle/source/talk/base/timing.h"
+#include "third_party/webrtc/base/ratelimiter.h"
+#include "third_party/webrtc/base/timing.h"
namespace content {
@@ -16,19 +16,19 @@ const int kMaxIceMessageBandwidth = 256 * 1024;
P2PMessageThrottler::P2PMessageThrottler()
- : timing_(new talk_base::Timing()),
- rate_limiter_(new talk_base::RateLimiter(kMaxIceMessageBandwidth, 1.0)) {
+ : timing_(new rtc::Timing()),
+ rate_limiter_(new rtc::RateLimiter(kMaxIceMessageBandwidth, 1.0)) {
}
P2PMessageThrottler::~P2PMessageThrottler() {
}
-void P2PMessageThrottler::SetTiming(scoped_ptr<talk_base::Timing> timing) {
+void P2PMessageThrottler::SetTiming(scoped_ptr<rtc::Timing> timing) {
timing_ = timing.Pass();
}
void P2PMessageThrottler::SetSendIceBandwidth(int bandwidth_kbps) {
- rate_limiter_.reset(new talk_base::RateLimiter(bandwidth_kbps, 1.0));
+ rate_limiter_.reset(new rtc::RateLimiter(bandwidth_kbps, 1.0));
}
bool P2PMessageThrottler::DropNextPacket(size_t packet_len) {
diff --git a/content/browser/renderer_host/p2p/socket_host_throttler.h b/content/browser/renderer_host/p2p/socket_host_throttler.h
index 166d300..a28a588 100644
--- a/content/browser/renderer_host/p2p/socket_host_throttler.h
+++ b/content/browser/renderer_host/p2p/socket_host_throttler.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
-namespace talk_base {
+namespace rtc {
class RateLimiter;
class Timing;
}
@@ -24,13 +24,13 @@ class CONTENT_EXPORT P2PMessageThrottler {
P2PMessageThrottler();
virtual ~P2PMessageThrottler();
- void SetTiming(scoped_ptr<talk_base::Timing> timing);
+ void SetTiming(scoped_ptr<rtc::Timing> timing);
bool DropNextPacket(size_t packet_len);
void SetSendIceBandwidth(int bandwith_kbps);
private:
- scoped_ptr<talk_base::Timing> timing_;
- scoped_ptr<talk_base::RateLimiter> rate_limiter_;
+ scoped_ptr<rtc::Timing> timing_;
+ scoped_ptr<rtc::RateLimiter> rate_limiter_;
DISALLOW_COPY_AND_ASSIGN(P2PMessageThrottler);
};
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc
index 2af80aa..3833b62 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc
@@ -15,7 +15,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
namespace {
@@ -52,7 +52,7 @@ namespace content {
P2PSocketHostUdp::PendingPacket::PendingPacket(
const net::IPEndPoint& to,
const std::vector<char>& content,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 id)
: to(to),
data(new net::IOBuffer(content.size())),
@@ -186,7 +186,7 @@ void P2PSocketHostUdp::HandleReadResult(int result) {
void P2PSocketHostUdp::Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) {
if (!socket_) {
// The Send message may be sent after the an OnError message was
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.h b/content/browser/renderer_host/p2p/socket_host_udp.h
index b22795c..761ef1e 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.h
+++ b/content/browser/renderer_host/p2p/socket_host_udp.h
@@ -18,7 +18,7 @@
#include "content/common/p2p_socket_type.h"
#include "net/base/ip_endpoint.h"
#include "net/udp/udp_server_socket.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
namespace content {
@@ -36,7 +36,7 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
const P2PHostAndIPEndPoint& remote_address) OVERRIDE;
virtual void Send(const net::IPEndPoint& to,
const std::vector<char>& data,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 packet_id) OVERRIDE;
virtual P2PSocketHost* AcceptIncomingTcpConnection(
const net::IPEndPoint& remote_address, int id) OVERRIDE;
@@ -50,13 +50,13 @@ class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
struct PendingPacket {
PendingPacket(const net::IPEndPoint& to,
const std::vector<char>& content,
- const talk_base::PacketOptions& options,
+ const rtc::PacketOptions& options,
uint64 id);
~PendingPacket();
net::IPEndPoint to;
scoped_refptr<net::IOBuffer> data;
int size;
- talk_base::PacketOptions packet_options;
+ rtc::PacketOptions packet_options;
uint64 id;
};
diff --git a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
index 6235cb0..2220471 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
@@ -17,7 +17,7 @@
#include "net/udp/datagram_server_socket.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/libjingle/source/talk/base/timing.h"
+#include "third_party/webrtc/base/timing.h"
using ::testing::_;
using ::testing::DeleteArg;
@@ -26,7 +26,7 @@ using ::testing::Return;
namespace {
-class FakeTiming : public talk_base::Timing {
+class FakeTiming : public rtc::Timing {
public:
FakeTiming() : now_(0.0) {}
virtual double TimerNow() OVERRIDE { return now_; }
@@ -197,7 +197,7 @@ class P2PSocketHostUdpTest : public testing::Test {
dest1_ = ParseAddress(kTestIpAddress1, kTestPort1);
dest2_ = ParseAddress(kTestIpAddress2, kTestPort2);
- scoped_ptr<talk_base::Timing> timing(new FakeTiming());
+ scoped_ptr<rtc::Timing> timing(new FakeTiming());
throttler_.SetTiming(timing.Pass());
}
@@ -221,7 +221,7 @@ TEST_F(P2PSocketHostUdpTest, SendStunNoAuth) {
.Times(3)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
socket_host_->Send(dest1_, packet1, options, 0);
@@ -247,7 +247,7 @@ TEST_F(P2PSocketHostUdpTest, SendDataNoAuth) {
MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@@ -271,7 +271,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunRequest) {
MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@@ -296,7 +296,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponse) {
MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
socket_host_->Send(dest1_, packet, options, 0);
@@ -317,7 +317,7 @@ TEST_F(P2PSocketHostUdpTest, SendAfterStunResponseDifferentHost) {
socket_->ReceivePacket(dest1_, request_packet);
// Should fail when trying to send the same packet to |dest2_|.
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet;
CreateRandomPacket(&packet);
EXPECT_CALL(sender_, Send(
@@ -334,7 +334,7 @@ TEST_F(P2PSocketHostUdpTest, ThrottleAfterLimit) {
.Times(2)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
throttler_.SetSendIceBandwidth(packet1.size() * 2);
@@ -363,7 +363,7 @@ TEST_F(P2PSocketHostUdpTest, ThrottleAfterLimitAfterReceive) {
.Times(4)
.WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> packet1;
CreateStunRequest(&packet1);
throttler_.SetSendIceBandwidth(packet1.size());
diff --git a/content/browser/renderer_host/p2p/socket_host_unittest.cc b/content/browser/renderer_host/p2p/socket_host_unittest.cc
index 1404ced..fc96e4a 100644
--- a/content/browser/renderer_host/p2p/socket_host_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_unittest.cc
@@ -297,7 +297,7 @@ TEST(P2PSocketHostTest, TestUpdateAbsSendTimeExtensionInTurnSendIndication) {
// without HMAC value in the packet.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithDefaultValues) {
unsigned char fake_tag[4] = { 0xba, 0xdd, 0xba, 0xdd };
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
std::vector<char> rtp_packet;
rtp_packet.resize(sizeof(kRtpMsgWithAbsSendTimeExtension) + 4); // tag length
memcpy(&rtp_packet[0], kRtpMsgWithAbsSendTimeExtension,
@@ -317,7 +317,7 @@ TEST(P2PSocketHostTest, TestApplyPacketOptionsWithDefaultValues) {
// Veirfy HMAC is updated when packet option parameters are set.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithAuthParams) {
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
options.packet_time_params.srtp_auth_key.resize(20);
options.packet_time_params.srtp_auth_key.assign(
kTestKey, kTestKey + sizeof(kTestKey));
@@ -348,7 +348,7 @@ TEST(P2PSocketHostTest, TestUpdateAbsSendTimeExtensionInRtpPacket) {
// Verify we update both AbsSendTime extension header and HMAC.
TEST(P2PSocketHostTest, TestApplyPacketOptionsWithAuthParamsAndAbsSendTime) {
- talk_base::PacketOptions options;
+ rtc::PacketOptions options;
options.packet_time_params.srtp_auth_key.resize(20);
options.packet_time_params.srtp_auth_key.assign(
kTestKey, kTestKey + sizeof(kTestKey));
diff --git a/content/common/p2p_messages.h b/content/common/p2p_messages.h
index 26846dd..d01807f 100644
--- a/content/common/p2p_messages.h
+++ b/content/common/p2p_messages.h
@@ -10,7 +10,7 @@
#include "content/common/p2p_socket_type.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/net_util.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
@@ -20,9 +20,9 @@ IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType,
content::P2P_SOCKET_TYPE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption,
content::P2P_SOCKET_OPT_MAX - 1)
-IPC_ENUM_TRAITS_MIN_MAX_VALUE(talk_base::DiffServCodePoint,
- talk_base::DSCP_NO_CHANGE,
- talk_base::DSCP_CS7)
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(rtc::DiffServCodePoint,
+ rtc::DSCP_NO_CHANGE,
+ rtc::DSCP_CS7)
IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
IPC_STRUCT_TRAITS_MEMBER(name)
@@ -30,14 +30,14 @@ IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
IPC_STRUCT_TRAITS_MEMBER(address)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketTimeUpdateParams)
+IPC_STRUCT_TRAITS_BEGIN(rtc::PacketTimeUpdateParams)
IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id)
IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key)
IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len)
IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(talk_base::PacketOptions)
+IPC_STRUCT_TRAITS_BEGIN(rtc::PacketOptions)
IPC_STRUCT_TRAITS_MEMBER(dscp)
IPC_STRUCT_TRAITS_MEMBER(packet_time_params)
IPC_STRUCT_TRAITS_END()
@@ -104,7 +104,7 @@ IPC_MESSAGE_CONTROL5(P2PHostMsg_Send,
int /* socket_id */,
net::IPEndPoint /* socket_address */,
std::vector<char> /* data */,
- talk_base::PacketOptions /* packet options */,
+ rtc::PacketOptions /* packet options */,
uint64 /* packet_id */)
IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket,
diff --git a/content/renderer/media/media_stream_audio_processor_unittest.cc b/content/renderer/media/media_stream_audio_processor_unittest.cc
index 267d1d2..867d48a 100644
--- a/content/renderer/media/media_stream_audio_processor_unittest.cc
+++ b/content/renderer/media/media_stream_audio_processor_unittest.cc
@@ -162,7 +162,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithoutAudioProcessing) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@@ -182,7 +182,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithAudioProcessing) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_TRUE(audio_processor->has_audio_processing());
@@ -207,7 +207,7 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyTabCaptureWithoutAudioProcessing) {
tab_constraint_factory.AddMandatory(kMediaStreamSource,
tab_string);
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
tab_constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@@ -224,7 +224,7 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyTabCaptureWithoutAudioProcessing) {
const std::string system_string = kMediaStreamSourceSystem;
system_constraint_factory.AddMandatory(kMediaStreamSource,
system_string);
- audio_processor = new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ audio_processor = new rtc::RefCountedObject<MediaStreamAudioProcessor>(
system_constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get());
EXPECT_FALSE(audio_processor->has_audio_processing());
@@ -241,7 +241,7 @@ TEST_F(MediaStreamAudioProcessorTest, TurnOffDefaultConstraints) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
@@ -357,7 +357,7 @@ TEST_F(MediaStreamAudioProcessorTest, TestAllSampleRates) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_TRUE(audio_processor->has_audio_processing());
@@ -398,7 +398,7 @@ TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
@@ -418,7 +418,7 @@ TEST_F(MediaStreamAudioProcessorTest, TestStereoAudio) {
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
new WebRtcAudioDeviceImpl());
scoped_refptr<MediaStreamAudioProcessor> audio_processor(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraint_factory.CreateWebMediaConstraints(), 0,
webrtc_audio_device.get()));
EXPECT_FALSE(audio_processor->has_audio_processing());
diff --git a/content/renderer/media/mock_peer_connection_impl.cc b/content/renderer/media/mock_peer_connection_impl.cc
index 7a09ea3..831571b 100644
--- a/content/renderer/media/mock_peer_connection_impl.cc
+++ b/content/renderer/media/mock_peer_connection_impl.cc
@@ -75,7 +75,7 @@ class MockStreamCollection : public webrtc::StreamCollectionInterface {
virtual ~MockStreamCollection() {}
private:
- typedef std::vector<talk_base::scoped_refptr<MediaStreamInterface> >
+ typedef std::vector<rtc::scoped_refptr<MediaStreamInterface> >
StreamVector;
StreamVector streams_;
};
@@ -194,7 +194,7 @@ class MockDtmfSender : public DtmfSenderInterface {
virtual ~MockDtmfSender() {}
private:
- talk_base::scoped_refptr<AudioTrackInterface> track_;
+ rtc::scoped_refptr<AudioTrackInterface> track_;
DtmfSenderObserverInterface* observer_;
std::string tones_;
int duration_;
@@ -207,8 +207,8 @@ const char MockPeerConnectionImpl::kDummyAnswer[] = "dummy answer";
MockPeerConnectionImpl::MockPeerConnectionImpl(
MockPeerConnectionDependencyFactory* factory)
: dependency_factory_(factory),
- local_streams_(new talk_base::RefCountedObject<MockStreamCollection>),
- remote_streams_(new talk_base::RefCountedObject<MockStreamCollection>),
+ local_streams_(new rtc::RefCountedObject<MockStreamCollection>),
+ remote_streams_(new rtc::RefCountedObject<MockStreamCollection>),
hint_audio_(false),
hint_video_(false),
getstats_result_(true),
@@ -221,12 +221,12 @@ MockPeerConnectionImpl::MockPeerConnectionImpl(
MockPeerConnectionImpl::~MockPeerConnectionImpl() {}
-talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
+rtc::scoped_refptr<webrtc::StreamCollectionInterface>
MockPeerConnectionImpl::local_streams() {
return local_streams_;
}
-talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
+rtc::scoped_refptr<webrtc::StreamCollectionInterface>
MockPeerConnectionImpl::remote_streams() {
return remote_streams_;
}
@@ -247,18 +247,18 @@ void MockPeerConnectionImpl::RemoveStream(
local_streams_->RemoveStream(local_stream);
}
-talk_base::scoped_refptr<DtmfSenderInterface>
+rtc::scoped_refptr<DtmfSenderInterface>
MockPeerConnectionImpl::CreateDtmfSender(AudioTrackInterface* track) {
if (!track) {
return NULL;
}
- return new talk_base::RefCountedObject<MockDtmfSender>(track);
+ return new rtc::RefCountedObject<MockDtmfSender>(track);
}
-talk_base::scoped_refptr<webrtc::DataChannelInterface>
+rtc::scoped_refptr<webrtc::DataChannelInterface>
MockPeerConnectionImpl::CreateDataChannel(const std::string& label,
const webrtc::DataChannelInit* config) {
- return new talk_base::RefCountedObject<MockDataChannel>(label, config);
+ return new rtc::RefCountedObject<MockDataChannel>(label, config);
}
bool MockPeerConnectionImpl::GetStats(
diff --git a/content/renderer/media/mock_peer_connection_impl.h b/content/renderer/media/mock_peer_connection_impl.h
index d563746..0d7a847 100644
--- a/content/renderer/media/mock_peer_connection_impl.h
+++ b/content/renderer/media/mock_peer_connection_impl.h
@@ -24,18 +24,18 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
explicit MockPeerConnectionImpl(MockPeerConnectionDependencyFactory* factory);
// PeerConnectionInterface implementation.
- virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
+ virtual rtc::scoped_refptr<webrtc::StreamCollectionInterface>
local_streams() OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::StreamCollectionInterface>
+ virtual rtc::scoped_refptr<webrtc::StreamCollectionInterface>
remote_streams() OVERRIDE;
virtual bool AddStream(
webrtc::MediaStreamInterface* local_stream,
const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
virtual void RemoveStream(
webrtc::MediaStreamInterface* local_stream) OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::DtmfSenderInterface>
+ virtual rtc::scoped_refptr<webrtc::DtmfSenderInterface>
CreateDtmfSender(webrtc::AudioTrackInterface* track) OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::DataChannelInterface>
+ virtual rtc::scoped_refptr<webrtc::DataChannelInterface>
CreateDataChannel(const std::string& label,
const webrtc::DataChannelInit* config) OVERRIDE;
@@ -124,8 +124,8 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
MockPeerConnectionDependencyFactory* dependency_factory_;
std::string stream_label_;
- talk_base::scoped_refptr<MockStreamCollection> local_streams_;
- talk_base::scoped_refptr<MockStreamCollection> remote_streams_;
+ rtc::scoped_refptr<MockStreamCollection> local_streams_;
+ rtc::scoped_refptr<MockStreamCollection> remote_streams_;
scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_;
scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_;
scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_;
diff --git a/content/renderer/media/peer_connection_identity_service.h b/content/renderer/media/peer_connection_identity_service.h
index b68cafa..a72cf47 100644
--- a/content/renderer/media/peer_connection_identity_service.h
+++ b/content/renderer/media/peer_connection_identity_service.h
@@ -38,7 +38,7 @@ class PeerConnectionIdentityService
// The origin of the DTLS connection.
GURL origin_;
- talk_base::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
+ rtc::scoped_refptr<webrtc::DTLSIdentityRequestObserver>
pending_observer_;
int pending_request_id_;
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index dc9be52..bead220 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -287,8 +287,8 @@ void PeerConnectionTracker::OnGetAllStats() {
for (PeerConnectionIdMap::iterator it = peer_connection_id_map_.begin();
it != peer_connection_id_map_.end(); ++it) {
- talk_base::scoped_refptr<InternalStatsObserver> observer(
- new talk_base::RefCountedObject<InternalStatsObserver>(it->second));
+ rtc::scoped_refptr<InternalStatsObserver> observer(
+ new rtc::RefCountedObject<InternalStatsObserver>(it->second));
it->first->GetStats(
observer,
diff --git a/content/renderer/media/rtc_data_channel_handler.cc b/content/renderer/media/rtc_data_channel_handler.cc
index 1fe4de1..004cc46 100644
--- a/content/renderer/media/rtc_data_channel_handler.cc
+++ b/content/renderer/media/rtc_data_channel_handler.cc
@@ -103,14 +103,14 @@ unsigned long RtcDataChannelHandler::bufferedAmount() {
bool RtcDataChannelHandler::sendStringData(const blink::WebString& data) {
std::string utf8_buffer = base::UTF16ToUTF8(data);
- talk_base::Buffer buffer(utf8_buffer.c_str(), utf8_buffer.length());
+ rtc::Buffer buffer(utf8_buffer.c_str(), utf8_buffer.length());
webrtc::DataBuffer data_buffer(buffer, false);
RecordMessageSent(data_buffer.size());
return channel_->Send(data_buffer);
}
bool RtcDataChannelHandler::sendRawData(const char* data, size_t length) {
- talk_base::Buffer buffer(data, length);
+ rtc::Buffer buffer(data, length);
webrtc::DataBuffer data_buffer(buffer, true);
RecordMessageSent(data_buffer.size());
return channel_->Send(data_buffer);
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index c5767ae..0f92bb6e 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -292,8 +292,8 @@ class StatsResponse : public webrtc::StatsObserver {
blink::WebString::fromUTF8(value));
}
- talk_base::scoped_refptr<LocalRTCStatsRequest> request_;
- talk_base::scoped_refptr<LocalRTCStatsResponse> response_;
+ rtc::scoped_refptr<LocalRTCStatsRequest> request_;
+ rtc::scoped_refptr<LocalRTCStatsResponse> response_;
};
// Implementation of LocalRTCStatsRequest.
@@ -315,7 +315,7 @@ blink::WebMediaStreamTrack LocalRTCStatsRequest::component() const {
scoped_refptr<LocalRTCStatsResponse> LocalRTCStatsRequest::createResponse() {
DCHECK(!response_);
- response_ = new talk_base::RefCountedObject<LocalRTCStatsResponse>(
+ response_ = new rtc::RefCountedObject<LocalRTCStatsResponse>(
impl_.createResponse());
return response_.get();
}
@@ -472,7 +472,7 @@ bool RTCPeerConnectionHandler::initialize(
peer_connection_tracker_->RegisterPeerConnection(
this, config, constraints, frame_);
- uma_observer_ = new talk_base::RefCountedObject<PeerConnectionUMAObserver>();
+ uma_observer_ = new rtc::RefCountedObject<PeerConnectionUMAObserver>();
native_peer_connection_->RegisterUMAObserver(uma_observer_.get());
return true;
}
@@ -500,7 +500,7 @@ void RTCPeerConnectionHandler::createOffer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebMediaConstraints& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
- new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
+ new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_OFFER));
RTCMediaConstraints constraints(options);
native_peer_connection_->CreateOffer(description_request.get(), &constraints);
@@ -513,7 +513,7 @@ void RTCPeerConnectionHandler::createOffer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebRTCOfferOptions& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
- new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
+ new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_OFFER));
RTCMediaConstraints constraints;
@@ -528,7 +528,7 @@ void RTCPeerConnectionHandler::createAnswer(
const blink::WebRTCSessionDescriptionRequest& request,
const blink::WebMediaConstraints& options) {
scoped_refptr<CreateSessionDescriptionRequest> description_request(
- new talk_base::RefCountedObject<CreateSessionDescriptionRequest>(
+ new rtc::RefCountedObject<CreateSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_CREATE_ANSWER));
RTCMediaConstraints constraints(options);
native_peer_connection_->CreateAnswer(description_request.get(),
@@ -558,7 +558,7 @@ void RTCPeerConnectionHandler::setLocalDescription(
this, description, PeerConnectionTracker::SOURCE_LOCAL);
scoped_refptr<SetSessionDescriptionRequest> set_request(
- new talk_base::RefCountedObject<SetSessionDescriptionRequest>(
+ new rtc::RefCountedObject<SetSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_SET_LOCAL_DESCRIPTION));
native_peer_connection_->SetLocalDescription(set_request.get(), native_desc);
}
@@ -583,7 +583,7 @@ void RTCPeerConnectionHandler::setRemoteDescription(
this, description, PeerConnectionTracker::SOURCE_REMOTE);
scoped_refptr<SetSessionDescriptionRequest> set_request(
- new talk_base::RefCountedObject<SetSessionDescriptionRequest>(
+ new rtc::RefCountedObject<SetSessionDescriptionRequest>(
request, this, PeerConnectionTracker::ACTION_SET_REMOTE_DESCRIPTION));
native_peer_connection_->SetRemoteDescription(set_request.get(), native_desc);
}
@@ -728,13 +728,13 @@ void RTCPeerConnectionHandler::removeStream(
void RTCPeerConnectionHandler::getStats(
const blink::WebRTCStatsRequest& request) {
scoped_refptr<LocalRTCStatsRequest> inner_request(
- new talk_base::RefCountedObject<LocalRTCStatsRequest>(request));
+ new rtc::RefCountedObject<LocalRTCStatsRequest>(request));
getStats(inner_request.get());
}
void RTCPeerConnectionHandler::getStats(LocalRTCStatsRequest* request) {
- talk_base::scoped_refptr<webrtc::StatsObserver> observer(
- new talk_base::RefCountedObject<StatsResponse>(request));
+ rtc::scoped_refptr<webrtc::StatsObserver> observer(
+ new rtc::RefCountedObject<StatsResponse>(request));
webrtc::MediaStreamTrackInterface* track = NULL;
if (request->hasSelector()) {
blink::WebMediaStreamSource::Type type =
@@ -798,7 +798,7 @@ blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel(
config.maxRetransmitTime = init.maxRetransmitTime;
config.protocol = base::UTF16ToUTF8(init.protocol);
- talk_base::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel(
+ rtc::scoped_refptr<webrtc::DataChannelInterface> webrtc_channel(
native_peer_connection_->CreateDataChannel(base::UTF16ToUTF8(label),
&config));
if (!webrtc_channel) {
@@ -826,7 +826,7 @@ blink::WebRTCDTMFSenderHandler* RTCPeerConnectionHandler::createDTMFSender(
}
webrtc::AudioTrackInterface* audio_track = native_track->GetAudioAdapter();
- talk_base::scoped_refptr<webrtc::DtmfSenderInterface> sender(
+ rtc::scoped_refptr<webrtc::DtmfSenderInterface> sender(
native_peer_connection_->CreateDtmfSender(audio_track));
if (!sender) {
DLOG(ERROR) << "Could not create native DTMF sender.";
diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h
index 299585f..ec5f775 100644
--- a/content/renderer/media/rtc_peer_connection_handler.h
+++ b/content/renderer/media/rtc_peer_connection_handler.h
@@ -33,7 +33,7 @@ class WebRtcMediaStreamAdapter;
// Mockable wrapper for blink::WebRTCStatsResponse
class CONTENT_EXPORT LocalRTCStatsResponse
- : public NON_EXPORTED_BASE(talk_base::RefCountInterface) {
+ : public NON_EXPORTED_BASE(rtc::RefCountInterface) {
public:
explicit LocalRTCStatsResponse(const blink::WebRTCStatsResponse& impl)
: impl_(impl) {
@@ -56,7 +56,7 @@ class CONTENT_EXPORT LocalRTCStatsResponse
// Mockable wrapper for blink::WebRTCStatsRequest
class CONTENT_EXPORT LocalRTCStatsRequest
- : public NON_EXPORTED_BASE(talk_base::RefCountInterface) {
+ : public NON_EXPORTED_BASE(rtc::RefCountInterface) {
public:
explicit LocalRTCStatsRequest(blink::WebRTCStatsRequest impl);
// Constructor for testing.
@@ -72,7 +72,7 @@ class CONTENT_EXPORT LocalRTCStatsRequest
private:
blink::WebRTCStatsRequest impl_;
- talk_base::scoped_refptr<LocalRTCStatsResponse> response_;
+ rtc::scoped_refptr<LocalRTCStatsResponse> response_;
};
// RTCPeerConnectionHandler is a delegate for the RTC PeerConnection API
diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
index a71c434..2bd05e7 100644
--- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
@@ -93,7 +93,7 @@ class MockRTCStatsRequest : public LocalRTCStatsRequest {
}
virtual scoped_refptr<LocalRTCStatsResponse> createResponse() OVERRIDE {
DCHECK(!response_.get());
- response_ = new talk_base::RefCountedObject<MockRTCStatsResponse>();
+ response_ = new rtc::RefCountedObject<MockRTCStatsResponse>();
return response_;
}
@@ -459,7 +459,7 @@ TEST_F(RTCPeerConnectionHandlerTest, addStreamWithStoppedAudioAndVideoTrack) {
TEST_F(RTCPeerConnectionHandlerTest, GetStatsNoSelector) {
scoped_refptr<MockRTCStatsRequest> request(
- new talk_base::RefCountedObject<MockRTCStatsRequest>());
+ new rtc::RefCountedObject<MockRTCStatsRequest>());
pc_handler_->getStats(request.get());
// Note that callback gets executed synchronously by mock.
ASSERT_TRUE(request->result());
@@ -468,7 +468,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsNoSelector) {
TEST_F(RTCPeerConnectionHandlerTest, GetStatsAfterClose) {
scoped_refptr<MockRTCStatsRequest> request(
- new talk_base::RefCountedObject<MockRTCStatsRequest>());
+ new rtc::RefCountedObject<MockRTCStatsRequest>());
pc_handler_->stop();
pc_handler_->getStats(request.get());
// Note that callback gets executed synchronously by mock.
@@ -486,7 +486,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithLocalSelector) {
ASSERT_LE(1ul, tracks.size());
scoped_refptr<MockRTCStatsRequest> request(
- new talk_base::RefCountedObject<MockRTCStatsRequest>());
+ new rtc::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(tracks[0]);
pc_handler_->getStats(request.get());
EXPECT_EQ(1, request->result()->report_count());
@@ -503,7 +503,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithRemoteSelector) {
ASSERT_LE(1ul, tracks.size());
scoped_refptr<MockRTCStatsRequest> request(
- new talk_base::RefCountedObject<MockRTCStatsRequest>());
+ new rtc::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(tracks[0]);
pc_handler_->getStats(request.get());
EXPECT_EQ(1, request->result()->report_count());
@@ -522,7 +522,7 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithBadSelector) {
mock_peer_connection_->SetGetStatsResult(false);
scoped_refptr<MockRTCStatsRequest> request(
- new talk_base::RefCountedObject<MockRTCStatsRequest>());
+ new rtc::RefCountedObject<MockRTCStatsRequest>());
request->setSelector(component);
pc_handler_->getStats(request.get());
EXPECT_EQ(0, request->result()->report_count());
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index 74dbbb2..933bd5d 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -72,7 +72,7 @@ void MediaStreamRemoteVideoSource::
RemoteVideoSourceDelegate::RenderFrame(
const cricket::VideoFrame* frame) {
base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
- frame->GetElapsedTime() / talk_base::kNumNanosecsPerMicrosec);
+ frame->GetElapsedTime() / rtc::kNumNanosecsPerMicrosec);
scoped_refptr<media::VideoFrame> video_frame;
if (frame->GetNativeHandle() != NULL) {
diff --git a/content/renderer/media/webrtc/media_stream_track_metrics.cc b/content/renderer/media/webrtc/media_stream_track_metrics.cc
index 736cac3..24feb2f 100644
--- a/content/renderer/media/webrtc/media_stream_track_metrics.cc
+++ b/content/renderer/media/webrtc/media_stream_track_metrics.cc
@@ -42,9 +42,9 @@ class MediaStreamTrackMetricsObserver : public webrtc::ObserverInterface {
virtual void OnChanged() OVERRIDE;
template <class T>
- IdSet GetTrackIds(const std::vector<talk_base::scoped_refptr<T> >& tracks) {
+ IdSet GetTrackIds(const std::vector<rtc::scoped_refptr<T> >& tracks) {
IdSet track_ids;
- typename std::vector<talk_base::scoped_refptr<T> >::const_iterator it =
+ typename std::vector<rtc::scoped_refptr<T> >::const_iterator it =
tracks.begin();
for (; it != tracks.end(); ++it) {
track_ids.insert((*it)->id());
@@ -72,7 +72,7 @@ class MediaStreamTrackMetricsObserver : public webrtc::ObserverInterface {
IdSet video_track_ids_;
MediaStreamTrackMetrics::StreamType stream_type_;
- talk_base::scoped_refptr<MediaStreamInterface> stream_;
+ rtc::scoped_refptr<MediaStreamInterface> stream_;
// Non-owning.
MediaStreamTrackMetrics* owner_;
diff --git a/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc b/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
index 343ab30..382fcba 100644
--- a/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
+++ b/content/renderer/media/webrtc/media_stream_track_metrics_unittest.cc
@@ -80,7 +80,7 @@ class MediaStreamTrackMetricsTest : public testing::Test {
public:
virtual void SetUp() OVERRIDE {
metrics_.reset(new MockMediaStreamTrackMetrics());
- stream_ = new talk_base::RefCountedObject<MockMediaStream>("stream");
+ stream_ = new rtc::RefCountedObject<MockMediaStream>("stream");
}
virtual void TearDown() OVERRIDE {
@@ -89,11 +89,11 @@ class MediaStreamTrackMetricsTest : public testing::Test {
}
scoped_refptr<MockAudioTrackInterface> MakeAudioTrack(std::string id) {
- return new talk_base::RefCountedObject<MockAudioTrackInterface>(id);
+ return new rtc::RefCountedObject<MockAudioTrackInterface>(id);
}
scoped_refptr<MockVideoTrackInterface> MakeVideoTrack(std::string id) {
- return new talk_base::RefCountedObject<MockVideoTrackInterface>(id);
+ return new rtc::RefCountedObject<MockVideoTrackInterface>(id);
}
scoped_ptr<MockMediaStreamTrackMetrics> metrics_;
diff --git a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
index a11272f..6d64c4c 100644
--- a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc
@@ -14,8 +14,8 @@
#include "content/renderer/media/webrtc_local_audio_track.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
-#include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h"
#include "third_party/libjingle/source/talk/media/base/videocapturer.h"
+#include "third_party/webrtc/base/scoped_ref_ptr.h"
using webrtc::AudioSourceInterface;
using webrtc::AudioTrackInterface;
@@ -90,13 +90,13 @@ VideoTrackVector MockMediaStream::GetVideoTracks() {
return video_track_vector_;
}
-talk_base::scoped_refptr<AudioTrackInterface> MockMediaStream::FindAudioTrack(
+rtc::scoped_refptr<AudioTrackInterface> MockMediaStream::FindAudioTrack(
const std::string& track_id) {
AudioTrackVector::iterator it = FindTrack(&audio_track_vector_, track_id);
return it == audio_track_vector_.end() ? NULL : *it;
}
-talk_base::scoped_refptr<VideoTrackInterface> MockMediaStream::FindVideoTrack(
+rtc::scoped_refptr<VideoTrackInterface> MockMediaStream::FindVideoTrack(
const std::string& track_id) {
VideoTrackVector::iterator it = FindTrack(&video_track_vector_, track_id);
return it == video_track_vector_.end() ? NULL : *it;
@@ -443,14 +443,14 @@ MockPeerConnectionDependencyFactory::CreatePeerConnection(
const webrtc::MediaConstraintsInterface* constraints,
blink::WebFrame* frame,
webrtc::PeerConnectionObserver* observer) {
- return new talk_base::RefCountedObject<MockPeerConnectionImpl>(this);
+ return new rtc::RefCountedObject<MockPeerConnectionImpl>(this);
}
scoped_refptr<webrtc::AudioSourceInterface>
MockPeerConnectionDependencyFactory::CreateLocalAudioSource(
const webrtc::MediaConstraintsInterface* constraints) {
last_audio_source_ =
- new talk_base::RefCountedObject<MockAudioSource>(constraints);
+ new rtc::RefCountedObject<MockAudioSource>(constraints);
return last_audio_source_;
}
@@ -464,7 +464,7 @@ scoped_refptr<webrtc::VideoSourceInterface>
MockPeerConnectionDependencyFactory::CreateVideoSource(
cricket::VideoCapturer* capturer,
const blink::WebMediaConstraints& constraints) {
- last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>();
+ last_video_source_ = new rtc::RefCountedObject<MockVideoSource>();
last_video_source_->SetVideoCapturer(capturer);
return last_video_source_;
}
@@ -478,7 +478,7 @@ MockPeerConnectionDependencyFactory::CreateWebAudioSource(
scoped_refptr<webrtc::MediaStreamInterface>
MockPeerConnectionDependencyFactory::CreateLocalMediaStream(
const std::string& label) {
- return new talk_base::RefCountedObject<MockMediaStream>(label);
+ return new rtc::RefCountedObject<MockMediaStream>(label);
}
scoped_refptr<webrtc::VideoTrackInterface>
@@ -486,7 +486,7 @@ MockPeerConnectionDependencyFactory::CreateLocalVideoTrack(
const std::string& id,
webrtc::VideoSourceInterface* source) {
scoped_refptr<webrtc::VideoTrackInterface> track(
- new talk_base::RefCountedObject<MockWebRtcVideoTrack>(
+ new rtc::RefCountedObject<MockWebRtcVideoTrack>(
id, source));
return track;
}
@@ -496,11 +496,11 @@ MockPeerConnectionDependencyFactory::CreateLocalVideoTrack(
const std::string& id,
cricket::VideoCapturer* capturer) {
scoped_refptr<MockVideoSource> source =
- new talk_base::RefCountedObject<MockVideoSource>();
+ new rtc::RefCountedObject<MockVideoSource>();
source->SetVideoCapturer(capturer);
return
- new talk_base::RefCountedObject<MockWebRtcVideoTrack>(id, source.get());
+ new rtc::RefCountedObject<MockWebRtcVideoTrack>(id, source.get());
}
SessionDescriptionInterface*
diff --git a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
index 2bdda74..871c183 100644
--- a/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
+++ b/content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h
@@ -145,9 +145,9 @@ class MockMediaStream : public webrtc::MediaStreamInterface {
virtual std::string label() const OVERRIDE;
virtual webrtc::AudioTrackVector GetAudioTracks() OVERRIDE;
virtual webrtc::VideoTrackVector GetVideoTracks() OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::AudioTrackInterface>
+ virtual rtc::scoped_refptr<webrtc::AudioTrackInterface>
FindAudioTrack(const std::string& track_id) OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::VideoTrackInterface>
+ virtual rtc::scoped_refptr<webrtc::VideoTrackInterface>
FindVideoTrack(const std::string& track_id) OVERRIDE;
virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index ed05bb9..9b4fcdb 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -44,7 +44,7 @@
#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
#if defined(USE_OPENSSL)
-#include "third_party/libjingle/source/talk/base/ssladapter.h"
+#include "third_party/webrtc/base/ssladapter.h"
#else
#include "net/socket/nss_ssl_util.h"
#endif
@@ -115,8 +115,8 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface {
public:
P2PPortAllocatorFactory(
P2PSocketDispatcher* socket_dispatcher,
- talk_base::NetworkManager* network_manager,
- talk_base::PacketSocketFactory* socket_factory,
+ rtc::NetworkManager* network_manager,
+ rtc::PacketSocketFactory* socket_factory,
blink::WebFrame* web_frame)
: socket_dispatcher_(socket_dispatcher),
network_manager_(network_manager),
@@ -163,8 +163,8 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface {
scoped_refptr<P2PSocketDispatcher> socket_dispatcher_;
// |network_manager_| and |socket_factory_| are a weak references, owned by
// PeerConnectionDependencyFactory.
- talk_base::NetworkManager* network_manager_;
- talk_base::PacketSocketFactory* socket_factory_;
+ rtc::NetworkManager* network_manager_;
+ rtc::PacketSocketFactory* socket_factory_;
// Raw ptr to the WebFrame that created the P2PPortAllocatorFactory.
blink::WebFrame* web_frame_;
};
@@ -309,7 +309,7 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
// Init SSL, which will be needed by PeerConnection.
#if defined(USE_OPENSSL)
- if (!talk_base::InitializeSSL()) {
+ if (!rtc::InitializeSSL()) {
LOG(ERROR) << "Failed on InitializeSSL.";
NOTREACHED();
return;
@@ -385,7 +385,7 @@ PeerConnectionDependencyFactory::CreatePeerConnection(
return NULL;
scoped_refptr<P2PPortAllocatorFactory> pa_factory =
- new talk_base::RefCountedObject<P2PPortAllocatorFactory>(
+ new rtc::RefCountedObject<P2PPortAllocatorFactory>(
p2p_socket_dispatcher_.get(),
network_manager_,
socket_factory_.get(),
@@ -549,7 +549,7 @@ PeerConnectionDependencyFactory::GetWebRtcAudioDevice() {
}
void PeerConnectionDependencyFactory::InitializeWorkerThread(
- talk_base::Thread** thread,
+ rtc::Thread** thread,
base::WaitableEvent* event) {
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true);
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.h b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
index 37e0b00..a8c96ca 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.h
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
@@ -22,7 +22,7 @@ namespace base {
class WaitableEvent;
}
-namespace talk_base {
+namespace rtc {
class NetworkManager;
class PacketSocketFactory;
class Thread;
@@ -179,7 +179,7 @@ class CONTENT_EXPORT PeerConnectionDependencyFactory
// creating PeerConnection objects.
void CreatePeerConnectionFactory();
- void InitializeWorkerThread(talk_base::Thread** thread,
+ void InitializeWorkerThread(rtc::Thread** thread,
base::WaitableEvent* event);
void CreateIpcNetworkManagerOnWorkerThread(base::WaitableEvent* event);
@@ -206,8 +206,8 @@ class CONTENT_EXPORT PeerConnectionDependencyFactory
// PeerConnection threads. signaling_thread_ is created from the
// "current" chrome thread.
- talk_base::Thread* signaling_thread_;
- talk_base::Thread* worker_thread_;
+ rtc::Thread* signaling_thread_;
+ rtc::Thread* worker_thread_;
base::Thread chrome_worker_thread_;
DISALLOW_COPY_AND_ASSIGN(PeerConnectionDependencyFactory);
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
index d94edb8..96b6837 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
@@ -18,8 +18,8 @@ scoped_refptr<WebRtcLocalAudioTrackAdapter>
WebRtcLocalAudioTrackAdapter::Create(
const std::string& label,
webrtc::AudioSourceInterface* track_source) {
- talk_base::RefCountedObject<WebRtcLocalAudioTrackAdapter>* adapter =
- new talk_base::RefCountedObject<WebRtcLocalAudioTrackAdapter>(
+ rtc::RefCountedObject<WebRtcLocalAudioTrackAdapter>* adapter =
+ new rtc::RefCountedObject<WebRtcLocalAudioTrackAdapter>(
label, track_source);
return adapter;
}
@@ -98,7 +98,7 @@ bool WebRtcLocalAudioTrackAdapter::GetSignalLevel(int* level) {
return true;
}
-talk_base::scoped_refptr<webrtc::AudioProcessorInterface>
+rtc::scoped_refptr<webrtc::AudioProcessorInterface>
WebRtcLocalAudioTrackAdapter::GetAudioProcessor() {
base::AutoLock auto_lock(lock_);
return audio_processor_.get();
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h
index b35ad4a..630af24 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h
@@ -67,7 +67,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrackAdapter
virtual void AddSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE;
virtual void RemoveSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE;
virtual bool GetSignalLevel(int* level) OVERRIDE;
- virtual talk_base::scoped_refptr<webrtc::AudioProcessorInterface>
+ virtual rtc::scoped_refptr<webrtc::AudioProcessorInterface>
GetAudioProcessor() OVERRIDE;
// cricket::AudioCapturer implementation.
@@ -83,7 +83,7 @@ class CONTENT_EXPORT WebRtcLocalAudioTrackAdapter
// The source of the audio track which handles the audio constraints.
// TODO(xians): merge |track_source_| to |capturer_| in WebRtcLocalAudioTrack.
- talk_base::scoped_refptr<webrtc::AudioSourceInterface> track_source_;
+ rtc::scoped_refptr<webrtc::AudioSourceInterface> track_source_;
// The audio processsor that applies audio processing on the data of audio
// track.
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index e47beea..994f77b 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -228,7 +228,7 @@ WebRtcAudioCapturer::WebRtcAudioCapturer(
MediaStreamAudioSource* audio_source)
: constraints_(constraints),
audio_processor_(
- new talk_base::RefCountedObject<MediaStreamAudioProcessor>(
+ new rtc::RefCountedObject<MediaStreamAudioProcessor>(
constraints, device_info.device.input.effects, audio_device)),
running_(false),
render_view_id_(render_view_id),
diff --git a/content/renderer/media/webrtc_audio_renderer_unittest.cc b/content/renderer/media/webrtc_audio_renderer_unittest.cc
index 3cf1b523..914dd52 100644
--- a/content/renderer/media/webrtc_audio_renderer_unittest.cc
+++ b/content/renderer/media/webrtc_audio_renderer_unittest.cc
@@ -87,7 +87,7 @@ class WebRtcAudioRendererTest : public testing::Test {
message_loop_->message_loop_proxy())),
factory_(new MockAudioDeviceFactory()),
source_(new MockAudioRendererSource()),
- stream_(new talk_base::RefCountedObject<MockMediaStream>("label")),
+ stream_(new rtc::RefCountedObject<MockMediaStream>("label")),
renderer_(new WebRtcAudioRenderer(stream_, 1, 1, 1, 44100, 441)) {
EXPECT_CALL(*factory_.get(), CreateOutputDevice(1))
.WillOnce(Return(mock_output_device_));
diff --git a/content/renderer/media/webrtc_logging.cc b/content/renderer/media/webrtc_logging.cc
index 96868a6..17e5c57 100644
--- a/content/renderer/media/webrtc_logging.cc
+++ b/content/renderer/media/webrtc_logging.cc
@@ -6,7 +6,7 @@
#include "base/time/time.h"
#include "content/public/renderer/webrtc_log_message_delegate.h"
-#include "third_party/libjingle/overrides/talk/base/logging.h"
+#include "third_party/webrtc/overrides/webrtc/base/logging.h"
namespace content {
@@ -22,7 +22,7 @@ void InitWebRtcLoggingDelegate(WebRtcLogMessageDelegate* delegate) {
void InitWebRtcLogging() {
// Log messages from Libjingle should not have timestamps.
- talk_base::InitDiagnosticLoggingDelegateFunction(&WebRtcLogMessage);
+ rtc::InitDiagnosticLoggingDelegateFunction(&WebRtcLogMessage);
}
void WebRtcLogMessage(const std::string& message) {
diff --git a/content/renderer/p2p/host_address_request.cc b/content/renderer/p2p/host_address_request.cc
index 72e7c46..e21e0aa 100644
--- a/content/renderer/p2p/host_address_request.cc
+++ b/content/renderer/p2p/host_address_request.cc
@@ -29,7 +29,7 @@ P2PAsyncAddressResolver::~P2PAsyncAddressResolver() {
DCHECK(!registered_);
}
-void P2PAsyncAddressResolver::Start(const talk_base::SocketAddress& host_name,
+void P2PAsyncAddressResolver::Start(const rtc::SocketAddress& host_name,
const DoneCallback& done_callback) {
DCHECK(delegate_message_loop_->BelongsToCurrentThread());
DCHECK_EQ(STATE_CREATED, state_);
@@ -51,7 +51,7 @@ void P2PAsyncAddressResolver::Cancel() {
}
void P2PAsyncAddressResolver::DoSendRequest(
- const talk_base::SocketAddress& host_name,
+ const rtc::SocketAddress& host_name,
const DoneCallback& done_callback) {
DCHECK(ipc_message_loop_->BelongsToCurrentThread());
diff --git a/content/renderer/p2p/host_address_request.h b/content/renderer/p2p/host_address_request.h
index 7c90b80..ab45486 100644
--- a/content/renderer/p2p/host_address_request.h
+++ b/content/renderer/p2p/host_address_request.h
@@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "net/base/net_util.h"
-#include "third_party/libjingle/source/talk/base/asyncresolverinterface.h"
+#include "third_party/webrtc/base/asyncresolverinterface.h"
namespace base {
class MessageLoop;
@@ -31,7 +31,7 @@ class P2PAsyncAddressResolver
P2PAsyncAddressResolver(P2PSocketDispatcher* dispatcher);
// Start address resolve process.
- void Start(const talk_base::SocketAddress& addr,
+ void Start(const rtc::SocketAddress& addr,
const DoneCallback& done_callback);
// Clients must unregister before exiting for cleanup.
void Cancel();
@@ -49,7 +49,7 @@ class P2PAsyncAddressResolver
virtual ~P2PAsyncAddressResolver();
- void DoSendRequest(const talk_base::SocketAddress& host_name,
+ void DoSendRequest(const rtc::SocketAddress& host_name,
const DoneCallback& done_callback);
void DoUnregister();
void OnResponse(const net::IPAddressList& address);
@@ -65,7 +65,7 @@ class P2PAsyncAddressResolver
// Accessed on the IPC thread only.
int32 request_id_;
bool registered_;
- std::vector<talk_base::IPAddress> addresses_;
+ std::vector<rtc::IPAddress> addresses_;
DoneCallback done_callback_;
DISALLOW_COPY_AND_ASSIGN(P2PAsyncAddressResolver);
diff --git a/content/renderer/p2p/ipc_network_manager.cc b/content/renderer/p2p/ipc_network_manager.cc
index d306787..8995339 100644
--- a/content/renderer/p2p/ipc_network_manager.cc
+++ b/content/renderer/p2p/ipc_network_manager.cc
@@ -15,21 +15,21 @@ namespace content {
namespace {
-talk_base::AdapterType ConvertConnectionTypeToAdapterType(
+rtc::AdapterType ConvertConnectionTypeToAdapterType(
net::NetworkChangeNotifier::ConnectionType type) {
switch (type) {
case net::NetworkChangeNotifier::CONNECTION_UNKNOWN:
- return talk_base::ADAPTER_TYPE_UNKNOWN;
+ return rtc::ADAPTER_TYPE_UNKNOWN;
case net::NetworkChangeNotifier::CONNECTION_ETHERNET:
- return talk_base::ADAPTER_TYPE_ETHERNET;
+ return rtc::ADAPTER_TYPE_ETHERNET;
case net::NetworkChangeNotifier::CONNECTION_WIFI:
- return talk_base::ADAPTER_TYPE_WIFI;
+ return rtc::ADAPTER_TYPE_WIFI;
case net::NetworkChangeNotifier::CONNECTION_2G:
case net::NetworkChangeNotifier::CONNECTION_3G:
case net::NetworkChangeNotifier::CONNECTION_4G:
- return talk_base::ADAPTER_TYPE_CELLULAR;
+ return rtc::ADAPTER_TYPE_CELLULAR;
default:
- return talk_base::ADAPTER_TYPE_UNKNOWN;
+ return rtc::ADAPTER_TYPE_UNKNOWN;
}
}
@@ -73,9 +73,9 @@ void IpcNetworkManager::OnNetworkListChanged(
// Note: 32 and 64 are the arbitrary(kind of) prefix length used to
// differentiate IPv4 and IPv6 addresses.
- // talk_base::Network uses these prefix_length to compare network
+ // rtc::Network uses these prefix_length to compare network
// interfaces discovered.
- std::vector<talk_base::Network*> networks;
+ std::vector<rtc::Network*> networks;
int ipv4_interfaces = 0;
int ipv6_interfaces = 0;
for (net::NetworkInterfaceList::const_iterator it = list.begin();
@@ -83,19 +83,19 @@ void IpcNetworkManager::OnNetworkListChanged(
if (it->address.size() == net::kIPv4AddressSize) {
uint32 address;
memcpy(&address, &it->address[0], sizeof(uint32));
- address = talk_base::NetworkToHost32(address);
- talk_base::Network* network = new talk_base::Network(
- it->name, it->name, talk_base::IPAddress(address), 32,
+ address = rtc::NetworkToHost32(address);
+ rtc::Network* network = new rtc::Network(
+ it->name, it->name, rtc::IPAddress(address), 32,
ConvertConnectionTypeToAdapterType(it->type));
- network->AddIP(talk_base::IPAddress(address));
+ network->AddIP(rtc::IPAddress(address));
networks.push_back(network);
++ipv4_interfaces;
} else if (it->address.size() == net::kIPv6AddressSize) {
in6_addr address;
memcpy(&address, &it->address[0], sizeof(in6_addr));
- talk_base::IPAddress ip6_addr(address);
- if (!talk_base::IPIsPrivate(ip6_addr)) {
- talk_base::Network* network = new talk_base::Network(
+ rtc::IPAddress ip6_addr(address);
+ if (!rtc::IPIsPrivate(ip6_addr)) {
+ rtc::Network* network = new rtc::Network(
it->name, it->name, ip6_addr, 64,
ConvertConnectionTypeToAdapterType(it->type));
network->AddIP(ip6_addr);
@@ -115,16 +115,16 @@ void IpcNetworkManager::OnNetworkListChanged(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAllowLoopbackInPeerConnection)) {
std::string name_v4("loopback_ipv4");
- talk_base::IPAddress ip_address_v4(INADDR_LOOPBACK);
- talk_base::Network* network_v4 = new talk_base::Network(
- name_v4, name_v4, ip_address_v4, 32, talk_base::ADAPTER_TYPE_UNKNOWN);
+ rtc::IPAddress ip_address_v4(INADDR_LOOPBACK);
+ rtc::Network* network_v4 = new rtc::Network(
+ name_v4, name_v4, ip_address_v4, 32, rtc::ADAPTER_TYPE_UNKNOWN);
network_v4->AddIP(ip_address_v4);
networks.push_back(network_v4);
std::string name_v6("loopback_ipv6");
- talk_base::IPAddress ip_address_v6(in6addr_loopback);
- talk_base::Network* network_v6 = new talk_base::Network(
- name_v6, name_v6, ip_address_v6, 64, talk_base::ADAPTER_TYPE_UNKNOWN);
+ rtc::IPAddress ip_address_v6(in6addr_loopback);
+ rtc::Network* network_v6 = new rtc::Network(
+ name_v6, name_v6, ip_address_v6, 64, rtc::ADAPTER_TYPE_UNKNOWN);
network_v6->AddIP(ip_address_v6);
networks.push_back(network_v6);
}
diff --git a/content/renderer/p2p/ipc_network_manager.h b/content/renderer/p2p/ipc_network_manager.h
index 06931dc..4ed3c48 100644
--- a/content/renderer/p2p/ipc_network_manager.h
+++ b/content/renderer/p2p/ipc_network_manager.h
@@ -12,13 +12,13 @@
#include "content/common/content_export.h"
#include "content/renderer/p2p/network_list_observer.h"
#include "content/renderer/p2p/socket_dispatcher.h"
-#include "third_party/libjingle/source/talk/base/network.h"
+#include "third_party/webrtc/base/network.h"
namespace content {
// IpcNetworkManager is a NetworkManager for libjingle that gets a
// list of network interfaces from the browser.
-class IpcNetworkManager : public talk_base::NetworkManagerBase,
+class IpcNetworkManager : public rtc::NetworkManagerBase,
public NetworkListObserver {
public:
// Constructor doesn't take ownership of the |socket_dispatcher|.
diff --git a/content/renderer/p2p/ipc_socket_factory.cc b/content/renderer/p2p/ipc_socket_factory.cc
index f9dfbe0..62428ad 100644
--- a/content/renderer/p2p/ipc_socket_factory.cc
+++ b/content/renderer/p2p/ipc_socket_factory.cc
@@ -19,7 +19,7 @@
#include "content/renderer/p2p/socket_client_impl.h"
#include "content/renderer/p2p/socket_dispatcher.h"
#include "jingle/glue/utils.h"
-#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
+#include "third_party/webrtc/base/asyncpacketsocket.h"
namespace content {
@@ -36,22 +36,22 @@ bool IsTcpClientSocket(P2PSocketType type) {
(type == P2P_SOCKET_STUN_TLS_CLIENT);
}
-bool JingleSocketOptionToP2PSocketOption(talk_base::Socket::Option option,
+bool JingleSocketOptionToP2PSocketOption(rtc::Socket::Option option,
P2PSocketOption* ipc_option) {
switch (option) {
- case talk_base::Socket::OPT_RCVBUF:
+ case rtc::Socket::OPT_RCVBUF:
*ipc_option = P2P_SOCKET_OPT_RCVBUF;
break;
- case talk_base::Socket::OPT_SNDBUF:
+ case rtc::Socket::OPT_SNDBUF:
*ipc_option = P2P_SOCKET_OPT_SNDBUF;
break;
- case talk_base::Socket::OPT_DSCP:
+ case rtc::Socket::OPT_DSCP:
*ipc_option = P2P_SOCKET_OPT_DSCP;
break;
- case talk_base::Socket::OPT_DONTFRAGMENT:
- case talk_base::Socket::OPT_NODELAY:
- case talk_base::Socket::OPT_IPV6_V6ONLY:
- case talk_base::Socket::OPT_RTP_SENDTIME_EXTN_ID:
+ case rtc::Socket::OPT_DONTFRAGMENT:
+ case rtc::Socket::OPT_NODELAY:
+ case rtc::Socket::OPT_IPV6_V6ONLY:
+ case rtc::Socket::OPT_RTP_SENDTIME_EXTN_ID:
return false; // Not supported by the chrome sockets.
default:
NOTREACHED();
@@ -63,10 +63,10 @@ bool JingleSocketOptionToP2PSocketOption(talk_base::Socket::Option option,
// TODO(miu): This needs tuning. http://crbug.com/237960
const size_t kMaximumInFlightBytes = 64 * 1024; // 64 KB
-// IpcPacketSocket implements talk_base::AsyncPacketSocket interface
+// IpcPacketSocket implements rtc::AsyncPacketSocket interface
// using P2PSocketClient that works over IPC-channel. It must be used
// on the thread it was created.
-class IpcPacketSocket : public talk_base::AsyncPacketSocket,
+class IpcPacketSocket : public rtc::AsyncPacketSocket,
public P2PSocketClientDelegate {
public:
IpcPacketSocket();
@@ -74,21 +74,21 @@ class IpcPacketSocket : public talk_base::AsyncPacketSocket,
// Always takes ownership of client even if initialization fails.
bool Init(P2PSocketType type, P2PSocketClientImpl* client,
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address);
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address);
- // talk_base::AsyncPacketSocket interface.
- virtual talk_base::SocketAddress GetLocalAddress() const OVERRIDE;
- virtual talk_base::SocketAddress GetRemoteAddress() const OVERRIDE;
+ // rtc::AsyncPacketSocket interface.
+ virtual rtc::SocketAddress GetLocalAddress() const OVERRIDE;
+ virtual rtc::SocketAddress GetRemoteAddress() const OVERRIDE;
virtual int Send(const void *pv, size_t cb,
- const talk_base::PacketOptions& options) OVERRIDE;
+ const rtc::PacketOptions& options) OVERRIDE;
virtual int SendTo(const void *pv, size_t cb,
- const talk_base::SocketAddress& addr,
- const talk_base::PacketOptions& options) OVERRIDE;
+ const rtc::SocketAddress& addr,
+ const rtc::PacketOptions& options) OVERRIDE;
virtual int Close() OVERRIDE;
virtual State GetState() const OVERRIDE;
- virtual int GetOption(talk_base::Socket::Option option, int* value) OVERRIDE;
- virtual int SetOption(talk_base::Socket::Option option, int value) OVERRIDE;
+ virtual int GetOption(rtc::Socket::Option option, int* value) OVERRIDE;
+ virtual int SetOption(rtc::Socket::Option option, int value) OVERRIDE;
virtual int GetError() const OVERRIDE;
virtual void SetError(int error) OVERRIDE;
@@ -119,8 +119,8 @@ class IpcPacketSocket : public talk_base::AsyncPacketSocket,
void TraceSendThrottlingState() const;
void InitAcceptedTcp(P2PSocketClient* client,
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address);
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address);
int DoSetOption(P2PSocketOption option, int value);
@@ -135,10 +135,10 @@ class IpcPacketSocket : public talk_base::AsyncPacketSocket,
// Local address is allocated by the browser process, and the
// renderer side doesn't know the address until it receives OnOpen()
// event from the browser.
- talk_base::SocketAddress local_address_;
+ rtc::SocketAddress local_address_;
// Remote address for client TCP connections.
- talk_base::SocketAddress remote_address_;
+ rtc::SocketAddress remote_address_;
// Current state of the object.
InternalState state_;
@@ -169,15 +169,15 @@ class IpcPacketSocket : public talk_base::AsyncPacketSocket,
// of MT sig slots clients must call disconnect. This class is to make sure
// we destruct from the same thread on which is created.
class AsyncAddressResolverImpl : public base::NonThreadSafe,
- public talk_base::AsyncResolverInterface {
+ public rtc::AsyncResolverInterface {
public:
AsyncAddressResolverImpl(P2PSocketDispatcher* dispatcher);
virtual ~AsyncAddressResolverImpl();
- // talk_base::AsyncResolverInterface interface.
- virtual void Start(const talk_base::SocketAddress& addr) OVERRIDE;
+ // rtc::AsyncResolverInterface interface.
+ virtual void Start(const rtc::SocketAddress& addr) OVERRIDE;
virtual bool GetResolvedAddress(
- int family, talk_base::SocketAddress* addr) const OVERRIDE;
+ int family, rtc::SocketAddress* addr) const OVERRIDE;
virtual int GetError() const OVERRIDE;
virtual void Destroy(bool wait) OVERRIDE;
@@ -186,7 +186,7 @@ class AsyncAddressResolverImpl : public base::NonThreadSafe,
scoped_refptr<P2PAsyncAddressResolver> resolver_;
int port_; // Port number in |addr| from Start() method.
- std::vector<talk_base::IPAddress> addresses_; // Resolved addresses.
+ std::vector<rtc::IPAddress> addresses_; // Resolved addresses.
};
IpcPacketSocket::IpcPacketSocket()
@@ -217,8 +217,8 @@ void IpcPacketSocket::TraceSendThrottlingState() const {
bool IpcPacketSocket::Init(P2PSocketType type,
P2PSocketClientImpl* client,
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address) {
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(state_, IS_UNINITIALIZED);
@@ -255,8 +255,8 @@ bool IpcPacketSocket::Init(P2PSocketType type,
void IpcPacketSocket::InitAcceptedTcp(
P2PSocketClient* client,
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address) {
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(state_, IS_UNINITIALIZED);
@@ -268,26 +268,26 @@ void IpcPacketSocket::InitAcceptedTcp(
client_->SetDelegate(this);
}
-// talk_base::AsyncPacketSocket interface.
-talk_base::SocketAddress IpcPacketSocket::GetLocalAddress() const {
+// rtc::AsyncPacketSocket interface.
+rtc::SocketAddress IpcPacketSocket::GetLocalAddress() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return local_address_;
}
-talk_base::SocketAddress IpcPacketSocket::GetRemoteAddress() const {
+rtc::SocketAddress IpcPacketSocket::GetRemoteAddress() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return remote_address_;
}
int IpcPacketSocket::Send(const void *data, size_t data_size,
- const talk_base::PacketOptions& options) {
+ const rtc::PacketOptions& options) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
return SendTo(data, data_size, remote_address_, options);
}
int IpcPacketSocket::SendTo(const void *data, size_t data_size,
- const talk_base::SocketAddress& address,
- const talk_base::PacketOptions& options) {
+ const rtc::SocketAddress& address,
+ const rtc::PacketOptions& options) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
switch (state_) {
@@ -355,7 +355,7 @@ int IpcPacketSocket::Close() {
return 0;
}
-talk_base::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
+rtc::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
switch (state_) {
@@ -382,7 +382,7 @@ talk_base::AsyncPacketSocket::State IpcPacketSocket::GetState() const {
return STATE_CLOSED;
}
-int IpcPacketSocket::GetOption(talk_base::Socket::Option option, int* value) {
+int IpcPacketSocket::GetOption(rtc::Socket::Option option, int* value) {
P2PSocketOption p2p_socket_option = P2P_SOCKET_OPT_MAX;
if (!JingleSocketOptionToP2PSocketOption(option, &p2p_socket_option)) {
// unsupported option.
@@ -393,7 +393,7 @@ int IpcPacketSocket::GetOption(talk_base::Socket::Option option, int* value) {
return 0;
}
-int IpcPacketSocket::SetOption(talk_base::Socket::Option option, int value) {
+int IpcPacketSocket::SetOption(rtc::Socket::Option option, int value) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
P2PSocketOption p2p_socket_option = P2P_SOCKET_OPT_MAX;
@@ -456,7 +456,7 @@ void IpcPacketSocket::OnOpen(const net::IPEndPoint& local_address,
// in the callback. This address will be used while sending the packets
// over the network.
if (remote_address_.IsUnresolvedIP()) {
- talk_base::SocketAddress jingle_socket_address;
+ rtc::SocketAddress jingle_socket_address;
if (!jingle_glue::IPEndPointToSocketAddress(
remote_address, &jingle_socket_address)) {
NOTREACHED();
@@ -474,7 +474,7 @@ void IpcPacketSocket::OnIncomingTcpConnection(
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
- talk_base::SocketAddress remote_address;
+ rtc::SocketAddress remote_address;
if (!jingle_glue::IPEndPointToSocketAddress(address, &remote_address)) {
// Always expect correct IPv4 address to be allocated.
NOTREACHED();
@@ -519,7 +519,7 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address,
const base::TimeTicks& timestamp) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
- talk_base::SocketAddress address_lj;
+ rtc::SocketAddress address_lj;
if (!jingle_glue::IPEndPointToSocketAddress(address, &address_lj)) {
// We should always be able to convert address here because we
// don't expect IPv6 address on IPv4 connections.
@@ -527,7 +527,7 @@ void IpcPacketSocket::OnDataReceived(const net::IPEndPoint& address,
return;
}
- talk_base::PacketTime packet_time(timestamp.ToInternalValue(), 0);
+ rtc::PacketTime packet_time(timestamp.ToInternalValue(), 0);
SignalReadPacket(this, &data[0], data.size(), address_lj,
packet_time);
}
@@ -540,7 +540,7 @@ AsyncAddressResolverImpl::AsyncAddressResolverImpl(
AsyncAddressResolverImpl::~AsyncAddressResolverImpl() {
}
-void AsyncAddressResolverImpl::Start(const talk_base::SocketAddress& addr) {
+void AsyncAddressResolverImpl::Start(const rtc::SocketAddress& addr) {
DCHECK(CalledOnValidThread());
// Copy port number from |addr|. |port_| must be copied
// when resolved address is returned in GetResolvedAddress.
@@ -552,7 +552,7 @@ void AsyncAddressResolverImpl::Start(const talk_base::SocketAddress& addr) {
}
bool AsyncAddressResolverImpl::GetResolvedAddress(
- int family, talk_base::SocketAddress* addr) const {
+ int family, rtc::SocketAddress* addr) const {
DCHECK(CalledOnValidThread());
if (addresses_.empty())
@@ -585,7 +585,7 @@ void AsyncAddressResolverImpl::OnAddressResolved(
const net::IPAddressList& addresses) {
DCHECK(CalledOnValidThread());
for (size_t i = 0; i < addresses.size(); ++i) {
- talk_base::SocketAddress socket_address;
+ rtc::SocketAddress socket_address;
if (!jingle_glue::IPEndPointToSocketAddress(
net::IPEndPoint(addresses[i], 0), &socket_address)) {
NOTREACHED();
@@ -605,54 +605,54 @@ IpcPacketSocketFactory::IpcPacketSocketFactory(
IpcPacketSocketFactory::~IpcPacketSocketFactory() {
}
-talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateUdpSocket(
- const talk_base::SocketAddress& local_address, int min_port, int max_port) {
- talk_base::SocketAddress crome_address;
+rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateUdpSocket(
+ const rtc::SocketAddress& local_address, int min_port, int max_port) {
+ rtc::SocketAddress crome_address;
P2PSocketClientImpl* socket_client =
new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
// TODO(sergeyu): Respect local_address and port limits here (need
// to pass them over IPC channel to the browser).
if (!socket->Init(P2P_SOCKET_UDP, socket_client,
- local_address, talk_base::SocketAddress())) {
+ local_address, rtc::SocketAddress())) {
return NULL;
}
return socket.release();
}
-talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateServerTcpSocket(
- const talk_base::SocketAddress& local_address, int min_port, int max_port,
+rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateServerTcpSocket(
+ const rtc::SocketAddress& local_address, int min_port, int max_port,
int opts) {
// TODO(sergeyu): Implement SSL support.
- if (opts & talk_base::PacketSocketFactory::OPT_SSLTCP)
+ if (opts & rtc::PacketSocketFactory::OPT_SSLTCP)
return NULL;
- P2PSocketType type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
+ P2PSocketType type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_SERVER : P2P_SOCKET_TCP_SERVER;
P2PSocketClientImpl* socket_client =
new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
if (!socket->Init(type, socket_client, local_address,
- talk_base::SocketAddress())) {
+ rtc::SocketAddress())) {
return NULL;
}
return socket.release();
}
-talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address,
- const talk_base::ProxyInfo& proxy_info,
+rtc::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address,
+ const rtc::ProxyInfo& proxy_info,
const std::string& user_agent, int opts) {
P2PSocketType type;
- if (opts & talk_base::PacketSocketFactory::OPT_SSLTCP) {
- type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
+ if (opts & rtc::PacketSocketFactory::OPT_SSLTCP) {
+ type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_SSLTCP_CLIENT : P2P_SOCKET_SSLTCP_CLIENT;
- } else if (opts & talk_base::PacketSocketFactory::OPT_TLS) {
- type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
+ } else if (opts & rtc::PacketSocketFactory::OPT_TLS) {
+ type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TLS_CLIENT : P2P_SOCKET_TLS_CLIENT;
} else {
- type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
+ type = (opts & rtc::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_CLIENT : P2P_SOCKET_TCP_CLIENT;
}
P2PSocketClientImpl* socket_client =
@@ -663,7 +663,7 @@ talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
return socket.release();
}
-talk_base::AsyncResolverInterface*
+rtc::AsyncResolverInterface*
IpcPacketSocketFactory::CreateAsyncResolver() {
scoped_ptr<AsyncAddressResolverImpl> resolver(
new AsyncAddressResolverImpl(socket_dispatcher_));
diff --git a/content/renderer/p2p/ipc_socket_factory.h b/content/renderer/p2p/ipc_socket_factory.h
index cba98b3..53e1edc 100644
--- a/content/renderer/p2p/ipc_socket_factory.h
+++ b/content/renderer/p2p/ipc_socket_factory.h
@@ -14,33 +14,33 @@ namespace content {
class P2PSocketDispatcher;
-// IpcPacketSocketFactory implements talk_base::PacketSocketFactory
+// IpcPacketSocketFactory implements rtc::PacketSocketFactory
// interface for libjingle using IPC-based P2P sockets. The class must
// be used on a thread that is a libjingle thread (implements
-// talk_base::Thread) and also has associated base::MessageLoop. Each
+// rtc::Thread) and also has associated base::MessageLoop. Each
// socket created by the factory must be used on the thread it was
// created on.
-class IpcPacketSocketFactory : public talk_base::PacketSocketFactory {
+class IpcPacketSocketFactory : public rtc::PacketSocketFactory {
public:
CONTENT_EXPORT explicit IpcPacketSocketFactory(
P2PSocketDispatcher* socket_dispatcher);
virtual ~IpcPacketSocketFactory();
- virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
- const talk_base::SocketAddress& local_address,
+ virtual rtc::AsyncPacketSocket* CreateUdpSocket(
+ const rtc::SocketAddress& local_address,
int min_port, int max_port) OVERRIDE;
- virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
- const talk_base::SocketAddress& local_address,
+ virtual rtc::AsyncPacketSocket* CreateServerTcpSocket(
+ const rtc::SocketAddress& local_address,
int min_port,
int max_port,
int opts) OVERRIDE;
- virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
- const talk_base::SocketAddress& local_address,
- const talk_base::SocketAddress& remote_address,
- const talk_base::ProxyInfo& proxy_info,
+ virtual rtc::AsyncPacketSocket* CreateClientTcpSocket(
+ const rtc::SocketAddress& local_address,
+ const rtc::SocketAddress& remote_address,
+ const rtc::ProxyInfo& proxy_info,
const std::string& user_agent,
int opts) OVERRIDE;
- virtual talk_base::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
+ virtual rtc::AsyncResolverInterface* CreateAsyncResolver() OVERRIDE;
private:
P2PSocketDispatcher* socket_dispatcher_;
diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc
index 61cfefd..be6a72e 100644
--- a/content/renderer/p2p/port_allocator.cc
+++ b/content/renderer/p2p/port_allocator.cc
@@ -69,8 +69,8 @@ P2PPortAllocator::Config::RelayServerConfig::~RelayServerConfig() {
P2PPortAllocator::P2PPortAllocator(
blink::WebFrame* web_frame,
P2PSocketDispatcher* socket_dispatcher,
- talk_base::NetworkManager* network_manager,
- talk_base::PacketSocketFactory* socket_factory,
+ rtc::NetworkManager* network_manager,
+ rtc::PacketSocketFactory* socket_factory,
const Config& config)
: cricket::BasicPortAllocator(network_manager, socket_factory),
web_frame_(web_frame),
@@ -259,7 +259,7 @@ void P2PPortAllocatorSession::ParseRelayResponse() {
void P2PPortAllocatorSession::AddConfig() {
const P2PPortAllocator::Config& config = allocator_->config_;
cricket::PortConfiguration* port_config = new cricket::PortConfiguration(
- talk_base::SocketAddress(config.stun_server, config.stun_server_port),
+ rtc::SocketAddress(config.stun_server, config.stun_server_port),
std::string(), std::string());
for (size_t i = 0; i < config.relays.size(); ++i) {
@@ -278,7 +278,7 @@ void P2PPortAllocatorSession::AddConfig() {
}
relay_server.ports.push_back(cricket::ProtocolAddress(
- talk_base::SocketAddress(config.relays[i].server_address,
+ rtc::SocketAddress(config.relays[i].server_address,
config.relays[i].port),
protocol,
config.relays[i].secure));
diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h
index 8ff20a5..258d785 100644
--- a/content/renderer/p2p/port_allocator.h
+++ b/content/renderer/p2p/port_allocator.h
@@ -56,8 +56,8 @@ class P2PPortAllocator : public cricket::BasicPortAllocator {
P2PPortAllocator(blink::WebFrame* web_frame,
P2PSocketDispatcher* socket_dispatcher,
- talk_base::NetworkManager* network_manager,
- talk_base::PacketSocketFactory* socket_factory,
+ rtc::NetworkManager* network_manager,
+ rtc::PacketSocketFactory* socket_factory,
const Config& config);
virtual ~P2PPortAllocator();
@@ -115,7 +115,7 @@ class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession,
scoped_ptr<blink::WebURLLoader> relay_session_request_;
int relay_session_attempts_;
std::string relay_session_response_;
- talk_base::SocketAddress relay_ip_;
+ rtc::SocketAddress relay_ip_;
int relay_udp_port_;
int relay_tcp_port_;
int relay_ssltcp_port_;
diff --git a/content/renderer/p2p/socket_client.h b/content/renderer/p2p/socket_client.h
index 5d1ecb5..d92407c 100644
--- a/content/renderer/p2p/socket_client.h
+++ b/content/renderer/p2p/socket_client.h
@@ -11,7 +11,7 @@
#include "content/common/p2p_socket_type.h"
#include "net/base/ip_endpoint.h"
-namespace talk_base {
+namespace rtc {
struct PacketOptions;
};
@@ -44,7 +44,7 @@ class P2PSocketClient : public base::RefCountedThreadSafe<P2PSocketClient> {
// |dscp|.
virtual void SendWithDscp(const net::IPEndPoint& address,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) = 0;
+ const rtc::PacketOptions& options) = 0;
virtual void SetOption(P2PSocketOption option, int value) = 0;
diff --git a/content/renderer/p2p/socket_client_impl.cc b/content/renderer/p2p/socket_client_impl.cc
index cfa898f..1425151 100644
--- a/content/renderer/p2p/socket_client_impl.cc
+++ b/content/renderer/p2p/socket_client_impl.cc
@@ -72,7 +72,7 @@ void P2PSocketClientImpl::DoInit(P2PSocketType type,
void P2PSocketClientImpl::SendWithDscp(
const net::IPEndPoint& address,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) {
+ const rtc::PacketOptions& options) {
if (!ipc_message_loop_->BelongsToCurrentThread()) {
ipc_message_loop_->PostTask(
FROM_HERE, base::Bind(
@@ -92,7 +92,7 @@ void P2PSocketClientImpl::SendWithDscp(
void P2PSocketClientImpl::Send(const net::IPEndPoint& address,
const std::vector<char>& data) {
- talk_base::PacketOptions options(talk_base::DSCP_DEFAULT);
+ rtc::PacketOptions options(rtc::DSCP_DEFAULT);
SendWithDscp(address, data, options);
}
diff --git a/content/renderer/p2p/socket_client_impl.h b/content/renderer/p2p/socket_client_impl.h
index ae19758..89e48c0 100644
--- a/content/renderer/p2p/socket_client_impl.h
+++ b/content/renderer/p2p/socket_client_impl.h
@@ -47,7 +47,7 @@ class P2PSocketClientImpl : public P2PSocketClient {
// |dscp|.
virtual void SendWithDscp(const net::IPEndPoint& address,
const std::vector<char>& data,
- const talk_base::PacketOptions& options) OVERRIDE;
+ const rtc::PacketOptions& options) OVERRIDE;
// Setting socket options.
virtual void SetOption(P2PSocketOption option, int value) OVERRIDE;
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.cc b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
index 604d827..318965e 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.cc
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
@@ -20,7 +20,7 @@
#include "ppapi/shared_impl/media_stream_buffer.h"
// IS_ALIGNED is also defined in
-// third_party/libjingle/overrides/talk/base/basictypes.h
+// third_party/webrtc/overrides/webrtc/base/basictypes.h
// TODO(ronghuawu): Avoid undef.
#undef IS_ALIGNED
#include "third_party/libyuv/include/libyuv.h"