Index: remoting/host/chromoting_host.h |
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h |
index 5fede9054ef03802771ec382fbc9082970284d61..b78139cd42fce363be1bd6b9f90426e7e9556d02 100644 |
--- a/remoting/host/chromoting_host.h |
+++ b/remoting/host/chromoting_host.h |
@@ -62,17 +62,15 @@ 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 |
- // |environment|, but they should not be deleted until returned host |
- // is destroyed. |
- static ChromotingHost* Create(ChromotingHostContext* context, |
- MutableHostConfig* config, |
- DesktopEnvironment* environment, |
- bool allow_nat_traversal); |
+ // The caller must ensure that |context|, |signal_strategy| and |
+ // |environment| out-live the host. |
+ ChromotingHost(ChromotingHostContext* context, |
+ MutableHostConfig* config, |
+ SignalStrategy* signal_strategy, |
+ DesktopEnvironment* environment, |
+ bool allow_nat_traversal); |
// Asynchronously start the host process. |
// |
@@ -98,11 +96,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 +145,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 +184,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. |