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

Unified Diff: remoting/protocol/jingle_session_manager.h

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (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 | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/jingle_session_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_manager.h
diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h
index a72d9a314bccae12251c56ff476b5b748d6b20a4..63f17b27de2fd7a814aec36b13fef8ac37f5b300 100644
--- a/remoting/protocol/jingle_session_manager.h
+++ b/remoting/protocol/jingle_session_manager.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "remoting/jingle_glue/signal_strategy.h"
#include "remoting/protocol/content_description.h"
#include "remoting/protocol/jingle_session.h"
#include "remoting/protocol/session_manager.h"
@@ -31,18 +32,17 @@ namespace protocol {
// This class implements SessionClient for Chromoting sessions. It acts as a
// server that accepts chromoting connections and can also make new connections
// to other hosts.
-class JingleSessionManager
- : public SessionManager,
- public cricket::SessionClient {
+class JingleSessionManager : public SessionManager,
+ public cricket::SessionClient,
+ public SignalStrategy::Listener {
public:
virtual ~JingleSessionManager();
JingleSessionManager(base::MessageLoopProxy* message_loop);
// SessionManager interface.
- virtual void Init(const std::string& local_jid,
- SignalStrategy* signal_strategy,
- Listener* listener,
+ virtual void Init(SignalStrategy* signal_strategy,
+ SessionManager::Listener* listener,
bool allow_nat_traversal) OVERRIDE;
virtual Session* Connect(
const std::string& host_jid,
@@ -67,6 +67,10 @@ class JingleSessionManager
buzz::XmlElement** elem,
cricket::WriteError* error) OVERRIDE;
+ // SignalStrategy::Listener interface.
+ virtual void OnSignalStrategyStateChange(
+ SignalStrategy::State state) OVERRIDE;
+
private:
friend class JingleSession;
@@ -95,12 +99,13 @@ class JingleSessionManager
scoped_ptr<talk_base::NetworkManager> network_manager_;
scoped_ptr<talk_base::PacketSocketFactory> socket_factory_;
- std::string local_jid_; // Full jid for the local side of the session.
SignalStrategy* signal_strategy_;
scoped_ptr<AuthenticatorFactory> authenticator_factory_;
- Listener* listener_;
+ SessionManager::Listener* listener_;
bool allow_nat_traversal_;
+ bool ready_;
+
scoped_ptr<cricket::PortAllocator> port_allocator_;
cricket::HttpPortAllocator* http_port_allocator_;
scoped_ptr<cricket::SessionManager> cricket_session_manager_;
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/jingle_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698