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

Unified Diff: remoting/host/log_to_server.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 | « remoting/host/it2me_host_user_interface.cc ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6049349acf92f5429a00e13634fb957bb8b0a072 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,25 +23,25 @@ class XmlElement;
namespace remoting {
+class ChromotingHost;
class IqSender;
-/**
- * A class that sends log entries to a server.
- *
- * The class is not thread-safe.
- */
-class LogToServer : public HostStatusObserver {
+// LogToServer sends log entries to a server.
+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 +51,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_;
« no previous file with comments | « remoting/host/it2me_host_user_interface.cc ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698