Chromium Code Reviews| Index: remoting/host/client_session.h |
| diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h |
| index 620923fc36a27773be3a524776cd349d7bc04ff3..8d96c9d583c4afc0d7cde192db6ee432103411a8 100644 |
| --- a/remoting/host/client_session.h |
| +++ b/remoting/host/client_session.h |
| @@ -7,12 +7,16 @@ |
| #include "remoting/protocol/connection_to_client.h" |
| #include "remoting/protocol/host_stub.h" |
| +#include "remoting/protocol/input_stub.h" |
| namespace remoting { |
| +class UserAuthenticator; |
| + |
| // A ClientSession keeps a reference to a connection to a client, and maintains |
| // per-client state. |
| class ClientSession : public protocol::HostStub, |
| + public protocol::InputStub, |
| public base::RefCountedThreadSafe<ClientSession> { |
| public: |
| // Callback interface for passing events to the ChromotingHost. |
| @@ -31,7 +35,9 @@ class ClientSession : public protocol::HostStub, |
| }; |
| ClientSession(EventHandler* event_handler, |
| - scoped_refptr<protocol::ConnectionToClient> connection); |
| + const base::Callback<UserAuthenticator*(void)>& auth_factory, |
|
Alpha Left Google
2011/03/28 16:22:26
I'm a but confused looking at this, can you do som
simonmorris
2011/03/29 17:07:51
Done.
|
| + scoped_refptr<protocol::ConnectionToClient> connection, |
| + protocol::InputStub* input_stub); |
| // protocol::HostStub interface. |
| virtual void SuggestResolution( |
| @@ -39,10 +45,15 @@ class ClientSession : public protocol::HostStub, |
| virtual void BeginSessionRequest( |
| const protocol::LocalLoginCredentials* credentials, Task* done); |
| + // protocol::InputStub interface. |
| + virtual void InjectKeyEvent(const protocol::KeyEvent* event, Task* done); |
| + virtual void InjectMouseEvent(const protocol::MouseEvent* event, Task* done); |
| + |
| // Disconnect this client session. |
| void Disconnect(); |
| protocol::ConnectionToClient* connection() const; |
|
Alpha Left Google
2011/03/28 16:22:26
nit: this getter can be inline.
simonmorris
2011/03/29 17:07:51
Done.
|
| + bool authenticated() const; |
|
Alpha Left Google
2011/03/28 16:22:26
nit: for simple getter like this you can simply do
simonmorris
2011/03/29 17:07:51
Done.
|
| protected: |
|
Alpha Left Google
2011/03/28 16:22:26
nit: Is there other class that inherit this? I thi
simonmorris
2011/03/29 17:07:51
Done.
|
| friend class base::RefCountedThreadSafe<ClientSession>; |
| @@ -50,8 +61,19 @@ class ClientSession : public protocol::HostStub, |
| private: |
| EventHandler* event_handler_; |
| + |
| + // A factory for user authenticators. |
| + base::Callback<UserAuthenticator*(void)> auth_factory_; |
| + |
| + // The connection to the client. |
| scoped_refptr<protocol::ConnectionToClient> connection_; |
| + // The input stub to which this object delegates. |
| + protocol::InputStub* input_stub_; |
| + |
| + // Whether this client is authenticated. |
| + bool authenticated_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ClientSession); |
| }; |