diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 14:05:47 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 14:05:47 +0000 |
commit | a8381db264be4ee75551b97c76a6cd5a8284c18a (patch) | |
tree | 19c0109001820010d003aa0bed7a677e721a7c10 | |
parent | f2d3600970493d0291caee504e5ebb933596b6b1 (diff) | |
download | chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.zip chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.tar.gz chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.tar.bz2 |
Switch to new libjingle branch.
BUG=None
TEST=Compiles, Unittests
Review URL: http://codereview.chromium.org/6626010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76913 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 4 | ||||
-rw-r--r-- | remoting/jingle_glue/jingle_client.cc | 11 | ||||
-rw-r--r-- | remoting/jingle_glue/jingle_client.h | 5 | ||||
-rw-r--r-- | remoting/protocol/session_manager_pair.cc | 6 | ||||
-rw-r--r-- | remoting/protocol/session_manager_pair.h | 2 | ||||
-rw-r--r-- | third_party/libjingle/libjingle.gyp | 7 | ||||
-rw-r--r-- | third_party/libjingle/overrides/talk/base/basictypes.h | 12 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_transport_impl.cc | 9 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_transport_impl.h | 2 |
9 files changed, 47 insertions, 11 deletions
@@ -8,7 +8,7 @@ vars = { "chromium_git": "http://git.chromium.org/git", "swig_revision": "69281", "nacl_revision": "4382", - "libjingle_revision": "50", + "libjingle_revision": "54", "libvpx_revision": "76510", "ffmpeg_revision": "76547", "skia_revision": "876", @@ -180,7 +180,7 @@ deps = { Var("ffmpeg_revision"), "src/third_party/libjingle/source": - (Var("googlecode_url") % "libjingle") + "/trunk@" + + (Var("googlecode_url") % "libjingle") + "/branches/chrome-sandbox@" + Var("libjingle_revision"), "src/third_party/speex": diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc index 085e47c..20d4057 100644 --- a/remoting/jingle_glue/jingle_client.cc +++ b/remoting/jingle_glue/jingle_client.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,6 +12,7 @@ #include "remoting/jingle_glue/jingle_thread.h" #include "remoting/jingle_glue/xmpp_socket_adapter.h" #include "third_party/libjingle/source/talk/base/asyncsocket.h" +#include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" #include "third_party/libjingle/source/talk/base/ssladapter.h" #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" #include "third_party/libjingle/source/talk/p2p/base/transport.h" @@ -211,8 +212,14 @@ void JingleClient::DoInitialize() { DCHECK_EQ(message_loop(), MessageLoop::current()); network_manager_.reset(new talk_base::NetworkManager()); + // TODO(sergeyu): Use IpcPacketSocketFactory here when it is + // implemented. + socket_factory_.reset(new talk_base::BasicPacketSocketFactory( + talk_base::Thread::Current())); + port_allocator_.reset( - new cricket::HttpPortAllocator(network_manager_.get(), "transp2")); + new cricket::HttpPortAllocator(network_manager_.get(), + socket_factory_.get(), "transp2")); // TODO(ajwong): The strategy needs a "start" command or something. Right // now, Init() implicitly starts processing events. Thus, we must have the // other fields of JingleClient initialized first, otherwise the state-change diff --git a/remoting/jingle_glue/jingle_client.h b/remoting/jingle_glue/jingle_client.h index ba759b9..4d877b5 100644 --- a/remoting/jingle_glue/jingle_client.h +++ b/remoting/jingle_glue/jingle_client.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,6 +17,7 @@ class Task; namespace talk_base { class NetworkManager; +class PacketSocketFactory; } // namespace talk_base namespace buzz { @@ -103,7 +104,6 @@ class XmppSignalStrategy : public SignalStrategy, public sigslot::has_slots<> { std::string auth_token_service_; buzz::XmppClient* xmpp_client_; StatusObserver* observer_; - scoped_ptr<talk_base::NetworkManager> network_manager_; cricket::HttpPortAllocator* port_allocator_; scoped_ptr<Task> allocator_config_cb_; @@ -210,6 +210,7 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>, SignalStrategy* signal_strategy_; scoped_ptr<talk_base::NetworkManager> network_manager_; + scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; scoped_ptr<cricket::HttpPortAllocator> port_allocator_; scoped_ptr<cricket::SessionManager> session_manager_; diff --git a/remoting/protocol/session_manager_pair.cc b/remoting/protocol/session_manager_pair.cc index b4cf131..ab776cd 100644 --- a/remoting/protocol/session_manager_pair.cc +++ b/remoting/protocol/session_manager_pair.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "remoting/jingle_glue/jingle_thread.h" #include "third_party/libjingle/source/talk/base/network.h" +#include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" @@ -26,9 +27,12 @@ void SessionManagerPair::Init() { DCHECK_EQ(message_loop_, MessageLoop::current()); network_manager_.reset(new talk_base::NetworkManager()); + socket_factory_.reset(new talk_base::BasicPacketSocketFactory( + talk_base::Thread::Current())); cricket::BasicPortAllocator* port_allocator = - new cricket::BasicPortAllocator(network_manager_.get()); + new cricket::BasicPortAllocator(network_manager_.get(), + socket_factory_.get()); port_allocator_.reset(port_allocator); host_session_manager_.reset(new cricket::SessionManager(port_allocator)); diff --git a/remoting/protocol/session_manager_pair.h b/remoting/protocol/session_manager_pair.h index f3e4f37f..cc8b75c 100644 --- a/remoting/protocol/session_manager_pair.h +++ b/remoting/protocol/session_manager_pair.h @@ -28,6 +28,7 @@ class SessionManager; namespace talk_base { class NetworkManager; +class PacketSocketFactory; } // namespace talk_base namespace remoting { @@ -61,6 +62,7 @@ class SessionManagerPair MessageLoop* message_loop_; scoped_ptr<talk_base::NetworkManager> network_manager_; + scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; scoped_ptr<cricket::BasicPortAllocator> port_allocator_; scoped_ptr<cricket::SessionManager> host_session_manager_; scoped_ptr<cricket::SessionManager> client_session_manager_; diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index fc855b5..18b235f9 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -155,7 +155,6 @@ 'source/talk/base/asyncfile.h', 'source/talk/base/asynchttprequest.cc', 'source/talk/base/asynchttprequest.h', - 'source/talk/base/asyncpacketsocket.cc', 'source/talk/base/asyncpacketsocket.h', 'source/talk/base/asyncsocket.cc', 'source/talk/base/asyncsocket.h', @@ -168,6 +167,8 @@ 'source/talk/base/base64.cc', 'source/talk/base/base64.h', 'source/talk/base/basicdefs.h', + 'source/talk/base/basicpacketsocketfactory.cc', + 'source/talk/base/basicpacketsocketfactory.h', 'source/talk/base/bytebuffer.cc', 'source/talk/base/bytebuffer.h', 'source/talk/base/byteorder.h', @@ -220,6 +221,8 @@ 'source/talk/base/proxydetect.h', 'source/talk/base/proxyinfo.cc', 'source/talk/base/proxyinfo.h', + 'source/talk/base/ratetracker.cc', + 'source/talk/base/ratetracker.h', 'source/talk/base/sec_buffer.h', 'source/talk/base/signalthread.cc', 'source/talk/base/signalthread.h', diff --git a/third_party/libjingle/overrides/talk/base/basictypes.h b/third_party/libjingle/overrides/talk/base/basictypes.h index d6f90cf..4ea193e 100644 --- a/third_party/libjingle/overrides/talk/base/basictypes.h +++ b/third_party/libjingle/overrides/talk/base/basictypes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -50,4 +50,14 @@ template<class T> inline T _max(T a, T b) { return (a < b) ? b : a; } const int kForever = -1; } +#ifdef WIN32 +#define alignof(t) __alignof(t) +#else // !WIN32 +#define alignof(t) __alignof__(t) +#endif // !WIN32 +#define IS_ALIGNED(p, a) (0==(reinterpret_cast<uintptr_t>(p) & ((a)-1))) +#define ALIGNP(p, t) \ + (reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) + \ + ((t)-1)) & ~((t)-1)))) + #endif // OVERRIDES_TALK_BASE_BASICTYPES_H__ diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc index dead066..0022014 100644 --- a/webkit/plugins/ppapi/ppb_transport_impl.cc +++ b/webkit/plugins/ppapi/ppb_transport_impl.cc @@ -7,6 +7,7 @@ #include "ppapi/c/dev/ppb_transport_dev.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" +#include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h" #include "third_party/libjingle/source/talk/p2p/client/httpportallocator.h" #include "webkit/plugins/ppapi/common.h" @@ -99,7 +100,13 @@ const PPB_Transport_Dev ppb_transport = { PPB_Transport_Impl::PPB_Transport_Impl(PluginInstance* instance) : Resource(instance), network_manager_(new talk_base::NetworkManager()), - allocator_(new cricket::HttpPortAllocator(network_manager_.get(), "")) { + // TODO(sergeyu): Use IpcPacketSocketFactory here when it is + // implemented, and when we have talk_base::Thread wrapper for + // Chromium threads. + socket_factory_(new talk_base::BasicPacketSocketFactory( + talk_base::Thread::Current())), + allocator_(new cricket::HttpPortAllocator( + network_manager_.get(), socket_factory_.get(), "")) { std::vector<talk_base::SocketAddress> stun_hosts; stun_hosts.push_back(talk_base::SocketAddress("stun.l.google.com", 19302)); allocator_->SetStunHosts(stun_hosts); diff --git a/webkit/plugins/ppapi/ppb_transport_impl.h b/webkit/plugins/ppapi/ppb_transport_impl.h index e631ce6..3383ea4 100644 --- a/webkit/plugins/ppapi/ppb_transport_impl.h +++ b/webkit/plugins/ppapi/ppb_transport_impl.h @@ -15,6 +15,7 @@ namespace talk_base { class NetworkManager; +class PacketSocketFactory; } // namespace talk_base namespace cricket { @@ -58,6 +59,7 @@ class PPB_Transport_Impl : public Resource, public sigslot::has_slots<> { bool Deserialize(PP_Var address, cricket::Candidate* candidate); scoped_ptr<talk_base::NetworkManager> network_manager_; + scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; scoped_ptr<cricket::HttpPortAllocator> allocator_; scoped_ptr<cricket::P2PTransportChannel> channel_; std::list<cricket::Candidate> local_candidates_; |