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

Unified Diff: remoting/host/client_session.h

Issue 8476018: Move ConnectionToClient::EventHandler from ChromotingHost to ClientSession (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index cfc1fe62d12c04051d33ea4328df9ba2f8b0640a..9be64cd222f4c62859a5be9a93750e2b3f09a3a6 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -22,6 +22,7 @@ class Capturer;
// per-client state.
class ClientSession : public protocol::HostStub,
public protocol::InputStub,
+ public protocol::ConnectionToClient::EventHandler,
public base::RefCountedThreadSafe<ClientSession> {
public:
// Callback interface for passing events to the ChromotingHost.
@@ -29,9 +30,10 @@ class ClientSession : public protocol::HostStub,
public:
virtual ~EventHandler() {}
- // Called to signal that authentication has succeeded.
- virtual void OnAuthenticationComplete(
- scoped_refptr<protocol::ConnectionToClient> client) = 0;
+ virtual void OnSessionAuthenticated(ClientSession* client) = 0;
+ virtual void OnSessionClosed(ClientSession* client) = 0;
+ virtual void OnSessionSequenceNumber(ClientSession* client,
+ int64 sequence_number) = 0;
};
// Takes ownership of |user_authenticator|. Does not take ownership of
@@ -45,12 +47,18 @@ class ClientSession : public protocol::HostStub,
virtual void InjectKeyEvent(const protocol::KeyEvent& event);
virtual void InjectMouseEvent(const protocol::MouseEvent& event);
- // Notifier called when the client is being disconnected.
- // This should only be called by ChromotingHost.
- void OnDisconnected();
-
- // Set the authenticated flag.
- void OnAuthenticationComplete();
+ // protocol::ConnectionToClient::EventHandler interface.
+ virtual void OnConnectionOpened(
+ protocol::ConnectionToClient* connection) OVERRIDE;
+ virtual void OnConnectionClosed(
+ protocol::ConnectionToClient* connection) OVERRIDE;
+ virtual void OnConnectionFailed(
+ protocol::ConnectionToClient* connection) OVERRIDE;
+ virtual void OnSequenceNumberUpdated(
+ protocol::ConnectionToClient* connection, int64 sequence_number) OVERRIDE;
+
+ // Disconnect the session
+ void Disconnect();
Wez 2011/11/09 01:35:07 Clarify the semantics; does this perform the netwo
Sergey Ulanov 2011/11/09 19:26:13 Done
protocol::ConnectionToClient* connection() const {
return connection_.get();

Powered by Google App Engine
This is Rietveld 408576698