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

Unified Diff: remoting/host/client_session.h

Issue 6724033: Remove authenticated_ fields from stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer's comments. 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 | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index 620923fc36a27773be3a524776cd349d7bc04ff3..e5ef81aecd59e13d01d12d1f3bded6fa24fa9e0a 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.
@@ -30,8 +34,12 @@ class ClientSession : public protocol::HostStub,
scoped_refptr<protocol::ConnectionToClient> client) = 0;
};
+ typedef UserAuthenticator* UserAuthenticatorFactory();
+
ClientSession(EventHandler* event_handler,
- scoped_refptr<protocol::ConnectionToClient> connection);
+ const base::Callback<UserAuthenticatorFactory>& auth_factory,
+ scoped_refptr<protocol::ConnectionToClient> connection,
+ protocol::InputStub* input_stub);
// protocol::HostStub interface.
virtual void SuggestResolution(
@@ -39,19 +47,39 @@ 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;
+ protocol::ConnectionToClient* connection() const {
+ return connection_.get();
+ }
- protected:
- friend class base::RefCountedThreadSafe<ClientSession>;
- ~ClientSession();
+ bool authenticated() const {
+ return authenticated_;
+ }
private:
+ friend class base::RefCountedThreadSafe<ClientSession>;
+ virtual ~ClientSession();
+
EventHandler* event_handler_;
+
+ // A factory for user authenticators.
+ base::Callback<UserAuthenticatorFactory> 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);
};
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698