summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/chromoting_host.h')
-rw-r--r--remoting/host/chromoting_host.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index ce3bdda..c1773cb 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -27,6 +27,7 @@ class Encoder;
class EventExecutor;
class MutableHostConfig;
class SessionManager;
+class JingleChromotingServer;
// A class to implement the functionality of a host process.
//
@@ -83,8 +84,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
////////////////////////////////////////////////////////////////////////////
// ClientConnection::EventHandler implementations
- virtual void HandleMessages(ClientConnection* client,
- ClientMessageList* messages);
+ virtual void HandleMessage(ClientConnection* client,
+ ChromotingClientMessage* message);
virtual void OnConnectionOpened(ClientConnection* client);
virtual void OnConnectionClosed(ClientConnection* client);
virtual void OnConnectionFailed(ClientConnection* client);
@@ -99,6 +100,9 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
JingleClient* jingle,
scoped_refptr<JingleChannel> channel);
+ // Callback for ChromotingServer.
+ void OnNewClientConnection(ChromotingConnection* connection, bool* accept);
+
private:
enum State {
kInitial,
@@ -106,6 +110,13 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
kStopped,
};
+ // This method connects to the talk network and start listening for incoming
+ // connections.
+ void DoStart(Task* shutdown_task);
+
+ // Callback for ChromotingServer::Close().
+ void OnServerClosed();
+
// The context that the chromoting host runs on.
ChromotingHostContext* context_;
@@ -126,6 +137,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
// receive connection requests from chromoting client.
scoped_refptr<JingleClient> jingle_client_;
+ scoped_refptr<JingleChromotingServer> chromotocol_server_;
+
// Objects that takes care of sending heartbeats to the chromoting bot.
scoped_refptr<HeartbeatSender> heartbeat_sender_;