summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_host.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:08:15 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:08:15 +0000
commit7b1c0376a17429471d2163c31ed4dbb05a9e819f (patch)
tree84018eceec973388732f768a6db69e901ea70b7e /remoting/protocol/connection_to_host.cc
parent5b54a5c0327ea3ac2c13cff37573ccd4e7f41e57 (diff)
downloadchromium_src-7b1c0376a17429471d2163c31ed4dbb05a9e819f.zip
chromium_src-7b1c0376a17429471d2163c31ed4dbb05a9e819f.tar.gz
chromium_src-7b1c0376a17429471d2163c31ed4dbb05a9e819f.tar.bz2
Integrate P2P Sockets IPC with chromoting plugin.
BUG=None TEST=None Review URL: http://codereview.chromium.org/6624020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_host.cc')
-rw-r--r--remoting/protocol/connection_to_host.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 27d2da1..3d34997 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -21,8 +21,13 @@
namespace remoting {
namespace protocol {
-ConnectionToHost::ConnectionToHost(JingleThread* thread)
+ConnectionToHost::ConnectionToHost(
+ JingleThread* thread,
+ talk_base::NetworkManager* network_manager,
+ talk_base::PacketSocketFactory* socket_factory)
: thread_(thread),
+ network_manager_(network_manager),
+ socket_factory_(socket_factory),
event_callback_(NULL),
dispatcher_(new ClientMessageDispatcher()) {
}
@@ -61,7 +66,9 @@ void ConnectionToHost::Connect(const std::string& username,
kChromotingTokenServiceName));
}
- jingle_client_ = new JingleClient(thread_, signal_strategy_.get(), this);
+ jingle_client_ = new JingleClient(thread_, signal_strategy_.get(),
+ network_manager_.release(),
+ socket_factory_.release(), this);
jingle_client_->Init();
// Save jid of the host. The actual connection is created later after
@@ -72,8 +79,7 @@ void ConnectionToHost::Connect(const std::string& username,
void ConnectionToHost::Disconnect() {
if (MessageLoop::current() != message_loop()) {
message_loop()->PostTask(
- FROM_HERE, NewRunnableMethod(this,
- &ConnectionToHost::Disconnect));
+ FROM_HERE, NewRunnableMethod(this, &ConnectionToHost::Disconnect));
return;
}