summaryrefslogtreecommitdiffstats
path: root/remoting/host/client_session.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:01:50 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:01:50 +0000
commitcba6f81b198a4781512a0b91ca41f24782ebbb16 (patch)
tree6962eabf5956c6983cfd311573dd76bd7344a4ed /remoting/host/client_session.h
parent93f8b568bc6d79505ea087bb6eb8b4a2a01a2a1f (diff)
downloadchromium_src-cba6f81b198a4781512a0b91ca41f24782ebbb16.zip
chromium_src-cba6f81b198a4781512a0b91ca41f24782ebbb16.tar.gz
chromium_src-cba6f81b198a4781512a0b91ca41f24782ebbb16.tar.bz2
Cleanups in the host authentication state handling.
- Previously ChromotingHost couldn't destinguish client authentication event from success full client connection. Now ClientSession calls different callbacks for these two events. - All failed unauthenticated connections are now treated as connection failures. - Host now specifies rejection reason for each rejected session. BUG=113273 Review URL: https://chromiumcodereview.appspot.com/9836063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session.h')
-rw-r--r--remoting/host/client_session.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index 79f2c6d..2ef11ec 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -35,6 +35,9 @@ class ClientSession : public protocol::HostEventStub,
// Called after authentication has finished successfully.
virtual void OnSessionAuthenticated(ClientSession* client) = 0;
+ // Called after we've finished connecting all channels.
+ virtual void OnSessionChannelsConnected(ClientSession* client) = 0;
+
// Called after authentication has failed. Must not tear down this
// object. OnSessionClosed() is notified after this handler
// returns.
@@ -71,11 +74,11 @@ class ClientSession : public protocol::HostEventStub,
virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
// protocol::ConnectionToClient::EventHandler interface.
- virtual void OnConnectionOpened(
+ virtual void OnConnectionAuthenticated(
protocol::ConnectionToClient* connection) OVERRIDE;
- virtual void OnConnectionClosed(
+ virtual void OnConnectionChannelsConnected(
protocol::ConnectionToClient* connection) OVERRIDE;
- virtual void OnConnectionFailed(protocol::ConnectionToClient* connection,
+ virtual void OnConnectionClosed(protocol::ConnectionToClient* connection,
protocol::ErrorCode error) OVERRIDE;
virtual void OnSequenceNumberUpdated(
protocol::ConnectionToClient* connection, int64 sequence_number) OVERRIDE;
@@ -94,10 +97,6 @@ class ClientSession : public protocol::HostEventStub,
return connection_.get();
}
- bool authenticated() const {
- return authenticated_;
- }
-
void set_awaiting_continue_approval(bool awaiting) {
awaiting_continue_approval_ = awaiting;
}
@@ -143,6 +142,10 @@ class ClientSession : public protocol::HostEventStub,
// Whether this client is authenticated.
bool authenticated_;
+ // Whether this client is fully connected (i.e. all channels are
+ // connected).
+ bool connected_;
+
// Whether or not inputs from this client are blocked pending approval from
// the host user to continue the connection.
bool awaiting_continue_approval_;