summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_client.h
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 12:13:35 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 12:13:35 +0000
commit44f6076044d0936eb3ab7394faaee1f48e6bef9b (patch)
tree0e92bca8141edd9cb00032a40857535b1ad4b9b2 /remoting/protocol/connection_to_client.h
parent8bb846f9fa618c1975638a49c3be7ec61f304d13 (diff)
downloadchromium_src-44f6076044d0936eb3ab7394faaee1f48e6bef9b.zip
chromium_src-44f6076044d0936eb3ab7394faaee1f48e6bef9b.tar.gz
chromium_src-44f6076044d0936eb3ab7394faaee1f48e6bef9b.tar.bz2
ChromotingHost can have multiple connections, but only one
authenticated connection. When a connection is authenticated, the host disconnects all other connections. The result is that if a client has disconnected without the host noticing, another client can connect immediately, without having to wait for the older connection to time out. The new ClientSession class encapsulates a ConnectionToClient and per-client state. It has taken the HostStub implementation away from DesktopEnvironment. BUG=70013 TEST=extra unit test; also see repro steps in BUG Review URL: http://codereview.chromium.org/6711033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_client.h')
-rw-r--r--remoting/protocol/connection_to_client.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index d2721f3..c9e4555 100644
--- a/remoting/protocol/connection_to_client.h
+++ b/remoting/protocol/connection_to_client.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -50,11 +50,8 @@ class ConnectionToClient :
// It is guranteed that |handler| is called only on the |message_loop|.
ConnectionToClient(MessageLoop* message_loop,
EventHandler* handler,
- HostStub* host_stub,
InputStub* input_stub);
- virtual ~ConnectionToClient();
-
virtual void Init(Session* session);
// Returns the connection in use.
@@ -72,9 +69,19 @@ class ConnectionToClient :
// Return pointer to ClientStub.
virtual ClientStub* client_stub();
+ virtual HostStub* host_stub();
+ virtual void set_host_stub(HostStub* host_stub);
+
// Called when the host accepts the client authentication.
void OnClientAuthenticated();
+ // Whether the client has been authenticated.
+ bool client_authenticated();
+
+ protected:
+ friend class base::RefCountedThreadSafe<ConnectionToClient>;
+ virtual ~ConnectionToClient();
+
private:
// Callback for protocol Session.
void OnSessionStateChange(Session::State state);