Index: remoting/host/log_to_server.h |
diff --git a/remoting/host/log_to_server.h b/remoting/host/log_to_server.h |
index 1cf27cf41d9e1fb4095744bff6800099bea1687b..2649259eb7a47ba00959f99be0300093cdda4f00 100644 |
--- a/remoting/host/log_to_server.h |
+++ b/remoting/host/log_to_server.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "remoting/host/host_status_observer.h" |
#include "remoting/host/server_log_entry.h" |
+#include "remoting/jingle_glue/signal_strategy.h" |
namespace base { |
class MessageLoopProxy; |
@@ -22,6 +23,7 @@ class XmlElement; |
namespace remoting { |
+class ChromotingHost; |
class IqSender; |
/** |
@@ -29,18 +31,21 @@ class IqSender; |
* |
* The class is not thread-safe. |
Wez
2012/01/03 16:25:04
nit: C++ify this comment, and clarify that "not th
Sergey Ulanov
2012/01/03 21:51:02
Done. Removed the comment about non thread-safe. W
|
*/ |
-class LogToServer : public HostStatusObserver { |
+class LogToServer : public HostStatusObserver, |
+ public SignalStrategy::Listener { |
public: |
- explicit LogToServer(base::MessageLoopProxy* message_loop); |
+ explicit LogToServer(SignalStrategy* signal_strategy); |
virtual ~LogToServer(); |
// Logs a session state change. |
// Currently, this is either connection or disconnection. |
void LogSessionStateChange(bool connected); |
- // HostStatusObserver implementation. |
- virtual void OnSignallingConnected(SignalStrategy* signal_strategy) OVERRIDE; |
- virtual void OnSignallingDisconnected() OVERRIDE; |
+ // SignalStrategy::Listener interface. |
+ virtual void OnSignalStrategyStateChange( |
+ SignalStrategy::State state) OVERRIDE; |
+ |
+ // HostStatusObserver interface. |
virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; |
virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
virtual void OnAccessDenied() OVERRIDE; |
@@ -50,7 +55,8 @@ class LogToServer : public HostStatusObserver { |
void Log(const ServerLogEntry& entry); |
void SendPendingEntries(); |
- scoped_refptr<base::MessageLoopProxy> message_loop_; |
+ scoped_refptr<ChromotingHost> host_; |
+ SignalStrategy* signal_strategy_; |
scoped_ptr<IqSender> iq_sender_; |
std::deque<ServerLogEntry> pending_entries_; |