summaryrefslogtreecommitdiffstats
path: root/remoting/client/jingle_host_connection.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 21:08:35 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 21:08:35 +0000
commit8922bdbce7e19faf46604138b6bf0e5276f1db3c (patch)
tree74cc718706f2dcee7cd4eff96f507dbcb2db472b /remoting/client/jingle_host_connection.cc
parent476f1c53ebdd8a5ddcadef5c34123f5492887176 (diff)
downloadchromium_src-8922bdbce7e19faf46604138b6bf0e5276f1db3c.zip
chromium_src-8922bdbce7e19faf46604138b6bf0e5276f1db3c.tar.gz
chromium_src-8922bdbce7e19faf46604138b6bf0e5276f1db3c.tar.bz2
Implemented chromotocol configuration negotiation.
Renamed "events" to "event". BUG=None TEST=None Review URL: http://codereview.chromium.org/3988002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/jingle_host_connection.cc')
-rw-r--r--remoting/client/jingle_host_connection.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc
index c70e2c6..b4a4ecf 100644
--- a/remoting/client/jingle_host_connection.cc
+++ b/remoting/client/jingle_host_connection.cc
@@ -43,7 +43,7 @@ void JingleHostConnection::Disconnect() {
return;
}
- events_writer_.Close();
+ event_writer_.Close();
video_reader_.Close();
if (connection_) {
@@ -73,9 +73,14 @@ void JingleHostConnection::InitConnection() {
NewCallback(this, &JingleHostConnection::OnNewChromotocolConnection));
chromotocol_server_ = chromotocol_server;
+ CandidateChromotocolConfig* candidate_config =
+ CandidateChromotocolConfig::CreateDefault();
+ // TODO(sergeyu): Set resolution in the |candidate_config| to the desired
+ // resolution.
+
// Initialize |connection_|.
connection_ = chromotocol_server_->Connect(
- host_jid_,
+ host_jid_, candidate_config,
NewCallback(this, &JingleHostConnection::OnConnectionStateChange));
}
@@ -100,7 +105,7 @@ void JingleHostConnection::OnServerClosed() {
void JingleHostConnection::SendEvent(const ChromotingClientMessage& msg) {
// This drops the message if we are not connected yet.
- events_writer_.SendMessage(msg);
+ event_writer_.SendMessage(msg);
}
// JingleClient::Callback interface.
@@ -120,10 +125,11 @@ void JingleHostConnection::OnStateChange(JingleClient* client,
}
void JingleHostConnection::OnNewChromotocolConnection(
- ChromotingConnection* connection, bool* accept) {
+ ChromotingConnection* connection,
+ ChromotingServer::NewConnectionResponse* response) {
DCHECK_EQ(message_loop(), MessageLoop::current());
// Client always rejects incoming connections.
- *accept = false;
+ *response = ChromotingServer::DECLINE;
}
void JingleHostConnection::OnConnectionStateChange(
@@ -142,7 +148,7 @@ void JingleHostConnection::OnConnectionStateChange(
case ChromotingConnection::CONNECTED:
// Initialize reader and writer.
- events_writer_.Init(connection_->GetEventsChannel());
+ event_writer_.Init(connection_->GetEventChannel());
video_reader_.Init(
connection_->GetVideoChannel(),
NewCallback(this, &JingleHostConnection::OnVideoMessage));