diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:11:44 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:11:44 +0000 |
commit | d6e6d13cb35c8e1dabd3eca5d03cf5d2c84abf54 (patch) | |
tree | 41bdaf07363bf6030ac9025a6d291201fa121684 /remoting/client | |
parent | 9593bd2d1813e5096b442a276b3a5b7b5408bf6a (diff) | |
download | chromium_src-d6e6d13cb35c8e1dabd3eca5d03cf5d2c84abf54.zip chromium_src-d6e6d13cb35c8e1dabd3eca5d03cf5d2c84abf54.tar.gz chromium_src-d6e6d13cb35c8e1dabd3eca5d03cf5d2c84abf54.tar.bz2 |
Cleanups in the chromotocol code.
1) Renamed ChromotingServer to ChromotocolServer.
2) Renamed ChromotingConnection to ChromotocolConnection.
3) Added documentation for ChromotocolServer.
4) Fixed methods names in ChromtocolConnection.
5) Removed some unncessary references to media/*.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/4105002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r-- | remoting/client/jingle_host_connection.cc | 24 | ||||
-rw-r--r-- | remoting/client/jingle_host_connection.h | 18 |
2 files changed, 21 insertions, 21 deletions
diff --git a/remoting/client/jingle_host_connection.cc b/remoting/client/jingle_host_connection.cc index b4a4ecf..76c17d5 100644 --- a/remoting/client/jingle_host_connection.cc +++ b/remoting/client/jingle_host_connection.cc @@ -8,7 +8,7 @@ #include "remoting/client/client_config.h" #include "remoting/client/jingle_host_connection.h" #include "remoting/jingle_glue/jingle_thread.h" -#include "remoting/protocol/jingle_chromoting_server.h" +#include "remoting/protocol/jingle_chromotocol_server.h" #include "remoting/protocol/util.h" namespace remoting { @@ -63,8 +63,8 @@ void JingleHostConnection::InitConnection() { DCHECK_EQ(message_loop(), MessageLoop::current()); // Initialize |chromotocol_server_|. - JingleChromotingServer* chromotocol_server = - new JingleChromotingServer(message_loop()); + JingleChromotocolServer* chromotocol_server = + new JingleChromotocolServer(context_->jingle_thread()); // TODO(ajwong): Make this a command switch when we're more stable. chromotocol_server->set_allow_local_ips(true); chromotocol_server->Init( @@ -125,32 +125,32 @@ void JingleHostConnection::OnStateChange(JingleClient* client, } void JingleHostConnection::OnNewChromotocolConnection( - ChromotingConnection* connection, - ChromotingServer::NewConnectionResponse* response) { + ChromotocolConnection* connection, + ChromotocolServer::IncomingConnectionResponse* response) { DCHECK_EQ(message_loop(), MessageLoop::current()); // Client always rejects incoming connections. - *response = ChromotingServer::DECLINE; + *response = ChromotocolServer::DECLINE; } void JingleHostConnection::OnConnectionStateChange( - ChromotingConnection::State state) { + ChromotocolConnection::State state) { DCHECK_EQ(message_loop(), MessageLoop::current()); DCHECK(event_callback_); switch (state) { - case ChromotingConnection::FAILED: + case ChromotocolConnection::FAILED: event_callback_->OnConnectionFailed(this); break; - case ChromotingConnection::CLOSED: + case ChromotocolConnection::CLOSED: event_callback_->OnConnectionClosed(this); break; - case ChromotingConnection::CONNECTED: + case ChromotocolConnection::CONNECTED: // Initialize reader and writer. - event_writer_.Init(connection_->GetEventChannel()); + event_writer_.Init(connection_->event_channel()); video_reader_.Init( - connection_->GetVideoChannel(), + connection_->video_channel(), NewCallback(this, &JingleHostConnection::OnVideoMessage)); event_callback_->OnConnectionOpened(this); break; diff --git a/remoting/client/jingle_host_connection.h b/remoting/client/jingle_host_connection.h index a72d8a9..ee5240f 100644 --- a/remoting/client/jingle_host_connection.h +++ b/remoting/client/jingle_host_connection.h @@ -25,8 +25,8 @@ #include "remoting/client/client_context.h" #include "remoting/client/host_connection.h" #include "remoting/jingle_glue/jingle_client.h" -#include "remoting/protocol/chromoting_connection.h" -#include "remoting/protocol/chromoting_server.h" +#include "remoting/protocol/chromotocol_connection.h" +#include "remoting/protocol/chromotocol_server.h" #include "remoting/protocol/stream_reader.h" #include "remoting/protocol/stream_writer.h" @@ -53,13 +53,13 @@ class JingleHostConnection : public HostConnection, // JingleClient::Callback interface. virtual void OnStateChange(JingleClient* client, JingleClient::State state); - // Callback for ChromotingServer. + // Callback for ChromotocolServer. void OnNewChromotocolConnection( - ChromotingConnection* connection, - ChromotingServer::NewConnectionResponse* response); + ChromotocolConnection* connection, + ChromotocolServer::IncomingConnectionResponse* response); - // Callback for ChromotingConnection. - void OnConnectionStateChange(ChromotingConnection::State state); + // Callback for ChromotocolConnection. + void OnConnectionStateChange(ChromotocolConnection::State state); private: // The message loop for the jingle thread this object works on. @@ -81,8 +81,8 @@ class JingleHostConnection : public HostConnection, ClientContext* context_; scoped_refptr<JingleClient> jingle_client_; - scoped_refptr<ChromotingServer> chromotocol_server_; - scoped_refptr<ChromotingConnection> connection_; + scoped_refptr<ChromotocolServer> chromotocol_server_; + scoped_refptr<ChromotocolConnection> connection_; EventStreamWriter event_writer_; VideoStreamReader video_reader_; |