summaryrefslogtreecommitdiffstats
path: root/remoting/client/jingle_host_connection.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 17:06:32 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 17:06:32 +0000
commitfc232b598c601e066f6a17b5c647b1e30667f38e (patch)
treebc7bb8d459caaed60ddc882d9aa66caa4bedacd0 /remoting/client/jingle_host_connection.cc
parentc1e0696a17d2683b191ebc9b3b5233260c12c3db (diff)
downloadchromium_src-fc232b598c601e066f6a17b5c647b1e30667f38e.zip
chromium_src-fc232b598c601e066f6a17b5c647b1e30667f38e.tar.gz
chromium_src-fc232b598c601e066f6a17b5c647b1e30667f38e.tar.bz2
Hookup the ChromotingPlugin into the refactored implementation
of HostConnection and ChromotingView. Also implement a bare-bones PepperView. No unittests yet. Still too in flux to be worth it. BUG=none TEST=none Review URL: http://codereview.chromium.org/2852003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/jingle_host_connection.cc')
-rw-r--r--remoting/client/jingle_host_connection.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc
index 7b9241c..9bf547f 100644
--- a/remoting/client/jingle_host_connection.cc
+++ b/remoting/client/jingle_host_connection.cc
@@ -9,9 +9,9 @@
namespace remoting {
-JingleHostConnection::JingleHostConnection(JingleThread* network_thread,
- HostEventCallback* event_callback)
- : network_thread_(network_thread), event_callback_(event_callback) {
+JingleHostConnection::JingleHostConnection(JingleThread* network_thread)
+ : network_thread_(network_thread),
+ event_callback_(NULL) {
}
JingleHostConnection::~JingleHostConnection() {
@@ -19,12 +19,13 @@ JingleHostConnection::~JingleHostConnection() {
void JingleHostConnection::Connect(const std::string& username,
const std::string& password,
- const std::string& host_jid) {
+ const std::string& host_jid,
+ HostEventCallback* event_callback) {
message_loop()->PostTask(
FROM_HERE,
- NewRunnableMethod(this,
- &JingleHostConnection::DoConnect,
- username, password, host_jid));
+ NewRunnableMethod(this, &JingleHostConnection::DoConnect,
+ username, password, host_jid,
+ event_callback));
}
void JingleHostConnection::Disconnect() {
@@ -109,9 +110,12 @@ MessageLoop* JingleHostConnection::message_loop() {
void JingleHostConnection::DoConnect(const std::string& username,
const std::string& auth_token,
- const std::string& host_jid) {
+ const std::string& host_jid,
+ HostEventCallback* event_callback) {
DCHECK_EQ(message_loop(), MessageLoop::current());
+ event_callback_ = event_callback;
+
jingle_client_ = new JingleClient(network_thread_);
jingle_client_->Init(username, auth_token, kChromotingTokenServiceName, this);
jingle_channel_ = jingle_client_->Connect(host_jid, this);