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

Unified Diff: remoting/host/chromoting_host.h

Issue 9004050: Move signaling connection creation out of ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 12 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 | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
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 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.
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698