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

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: Remove redundant member of HostMessageDispatcher. 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') | remoting/host/chromoting_host.cc » ('J')
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..26862b95199dc9657629ff13f474214bbda861db 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,12 +121,9 @@ 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 add_client(ClientSession* client) {
awong 2011/03/22 15:11:56 Chromium style says, add_client() shoudl only be u
simonmorris 2011/03/23 10:35:20 Done.
+ clients_.push_back(client);
}
private:
@@ -167,9 +167,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') | remoting/host/chromoting_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698