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

Unified Diff: remoting/host/chromoting_host.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
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | remoting/host/chromoting_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index 76c204c4be39a949099462dc929fd957bc774d3a..39d2ce684416fade689bdc2bd2b7563c55e834fd 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -26,7 +26,6 @@ class Task;
namespace remoting {
namespace protocol {
-class ConnectionToClient;
class HostStub;
class InputStub;
class SessionConfig;
@@ -64,7 +63,6 @@ class ScreenRecorder;
// return to the idle state. We then go to step (2) if there a new
// incoming connection.
class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
- public protocol::ConnectionToClient::EventHandler,
public ClientSession::EventHandler,
public SignalStrategy::StatusObserver,
public protocol::SessionManager::Listener {
@@ -99,15 +97,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
void AddStatusObserver(HostStatusObserver* observer);
////////////////////////////////////////////////////////////////////////////
- // protocol::ConnectionToClient::EventHandler implementation.
- // TODO(sergeyu): Move this to ClientSession.
- virtual void OnConnectionOpened(protocol::ConnectionToClient* client);
- virtual void OnConnectionClosed(protocol::ConnectionToClient* client);
- virtual void OnConnectionFailed(protocol::ConnectionToClient* client);
- virtual void OnSequenceNumberUpdated(protocol::ConnectionToClient* client,
- int64 sequence_number);
-
- ////////////////////////////////////////////////////////////////////////////
// SignalStrategy::StatusObserver implementation.
virtual void OnStateChange(
SignalStrategy::StatusObserver::State state) OVERRIDE;
@@ -115,8 +104,10 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
////////////////////////////////////////////////////////////////////////////
// ClientSession::EventHandler implementation.
- virtual void OnAuthenticationComplete(
- scoped_refptr<protocol::ConnectionToClient> client);
+ virtual void OnSessionAuthenticated(ClientSession* client) OVERRIDE;
+ virtual void OnSessionClosed(ClientSession* session) OVERRIDE;
+ virtual void OnSessionSequenceNumber(ClientSession* session,
+ int64 sequence_number) OVERRIDE;
// SessionManager::Listener implementation.
virtual void OnSessionManagerInitialized() OVERRIDE;
@@ -124,10 +115,9 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
protocol::Session* session,
protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE;
- void AddAuthenticatedClient(
- scoped_refptr<protocol::ConnectionToClient> connection,
- const protocol::SessionConfig& config,
- const std::string& jid);
+ void AddAuthenticatedClient(ClientSession* client,
Wez 2011/11/09 01:35:07 Does this belong in the public interface, since it
Sergey Ulanov 2011/11/09 19:26:13 Made it private. I either case I removed this meth
+ const protocol::SessionConfig& config,
+ const std::string& jid);
// Sets desired configuration for the protocol. Ownership of the
// |config| is transferred to the object. Must be called before Start().
@@ -178,7 +168,7 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
virtual ~ChromotingHost();
// This method is called if a client is disconnected from the host.
- void OnClientDisconnected(protocol::ConnectionToClient* client);
+ void OnClientDisconnected(ClientSession* client);
Wez 2011/11/09 01:35:07 nit: Perhaps it would be clearer to call this OnSe
Sergey Ulanov 2011/11/09 19:26:13 This method is removed in the next CL.
// Creates encoder for the specified configuration.
Encoder* CreateEncoder(const protocol::SessionConfig& config);
@@ -189,9 +179,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>,
void EnableCurtainMode(bool enable);
- void ProcessPreAuthentication(
- const scoped_refptr<protocol::ConnectionToClient>& connection);
-
void StopScreenRecorder();
void OnScreenRecorderStopped();
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | remoting/host/chromoting_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698