Chromium Code Reviews| Index: remoting/host/chromoting_host.h |
| diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h |
| index 5fede9054ef03802771ec382fbc9082970284d61..c2fc6403e0cc55caf255c542db81bdd91575f865 100644 |
| --- a/remoting/host/chromoting_host.h |
| +++ b/remoting/host/chromoting_host.h |
| @@ -62,17 +62,16 @@ class ScreenRecorder; |
| // incoming connection. |
| class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| public ClientSession::EventHandler, |
| - public SignalStrategy::Listener, |
| public protocol::SessionManager::Listener { |
| public: |
| - // Factory methods that must be used to create ChromotingHost |
| - // instances. It does NOT take ownership of |context|, and |
| + // Caller keeps ownership of |context|, |signal_strategy| and |
| // |environment|, but they should not be deleted until returned host |
| // is destroyed. |
|
Wez
2012/01/03 16:25:04
nit: Reword, e.g. "Creates a ChromotingHost instan
Sergey Ulanov
2012/01/03 21:51:02
Done. This is a constructor, so I don't think that
|
| - static ChromotingHost* Create(ChromotingHostContext* context, |
| - MutableHostConfig* config, |
| - DesktopEnvironment* environment, |
| - bool allow_nat_traversal); |
| + ChromotingHost(ChromotingHostContext* context, |
| + MutableHostConfig* config, |
| + SignalStrategy* signal_strategy, |
| + DesktopEnvironment* environment, |
| + bool allow_nat_traversal); |
| // Asynchronously start the host process. |
| // |
| @@ -98,11 +97,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| void SetSharedSecret(const std::string& shared_secret); |
| //////////////////////////////////////////////////////////////////////////// |
| - // SignalStrategy::Listener interface. |
| - virtual void OnSignalStrategyStateChange( |
| - SignalStrategy::State state) OVERRIDE; |
| - |
| - //////////////////////////////////////////////////////////////////////////// |
| // ClientSession::EventHandler implementation. |
| virtual void OnSessionAuthenticated(ClientSession* client) OVERRIDE; |
| virtual void OnSessionAuthenticationFailed(ClientSession* client) OVERRIDE; |
| @@ -152,11 +146,6 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| kStopped, |
| }; |
| - // Caller keeps ownership of |context| and |environment|. |
| - ChromotingHost(ChromotingHostContext* context, |
| - MutableHostConfig* config, |
| - DesktopEnvironment* environment, |
| - bool allow_nat_traversal); |
| virtual ~ChromotingHost(); |
| // Creates encoder for the specified configuration. |
| @@ -196,8 +185,7 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, |
| bool have_shared_secret_; |
| // Connection objects. |
| - scoped_ptr<SignalStrategy> signal_strategy_; |
| - std::string local_jid_; |
| + SignalStrategy* signal_strategy_; |
| scoped_ptr<protocol::SessionManager> session_manager_; |
| // StatusObserverList is thread-safe and can be used on any thread. |