Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: remoting/host/chromoting_host.h

Issue 6711033: A new authenticated connection evicts an old one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index fc6daaf957acf4bea2ba89f3b3a6bccd952eb72e..f754c272b04ca6bad2ababc9c92d45e2835a9cf8 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -12,6 +12,7 @@
#include "remoting/base/encoder.h"
#include "remoting/host/access_verifier.h"
#include "remoting/host/capturer.h"
+#include "remoting/host/client_session.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/heartbeat_sender.h"
#include "remoting/jingle_glue/jingle_client.h"
@@ -63,7 +64,7 @@ class ScreenRecorder;
// incoming connection.
class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
public protocol::ConnectionToClient::EventHandler,
- public DesktopEnvironment::EventHandler,
+ public ClientSession::EventHandler,
public JingleClient::Callback {
public:
// Factory methods that must be used to create ChromotingHost instances.
@@ -105,9 +106,11 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
virtual void OnStateChange(JingleClient* client, JingleClient::State state);
////////////////////////////////////////////////////////////////////////////
- // DesktopEnvironment::EventHandler implementations
- virtual void LocalLoginSucceeded();
- virtual void LocalLoginFailed();
+ // ClientSession::EventHandler implementations
+ virtual void LocalLoginSucceeded(
+ scoped_refptr<protocol::ConnectionToClient> client);
+ virtual void LocalLoginFailed(
+ scoped_refptr<protocol::ConnectionToClient> client);
// Callback for ChromotingServer.
void OnNewClientSession(
@@ -118,13 +121,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
// |config| is transferred to the object. Must be called before Start().
void set_protocol_config(protocol::CandidateSessionConfig* config);
- // This getter is only used in unit test.
- protocol::HostStub* host_stub() const;
-
// This setter is only used in unit test to simulate client connection.
- void set_connection(protocol::ConnectionToClient* conn) {
- connection_ = conn;
- }
+ void AddClient(ClientSession* client);
private:
friend class base::RefCountedThreadSafe<ChromotingHost>;
@@ -167,9 +165,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
AccessVerifier access_verifier_;
- // A ConnectionToClient manages the connectino to a remote client.
- // TODO(hclam): Expand this to a list of clients.
- scoped_refptr<protocol::ConnectionToClient> connection_;
+ // The connections to remote clients.
+ std::vector<scoped_refptr<ClientSession> > clients_;
// Session manager for the host process.
scoped_refptr<ScreenRecorder> recorder_;
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698