| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ | 5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ |
| 6 #define REMOTING_HOST_LOG_TO_SERVER_H_ | 6 #define REMOTING_HOST_LOG_TO_SERVER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class LogToServer : public HostStatusObserver { | 32 class LogToServer : public HostStatusObserver { |
| 33 public: | 33 public: |
| 34 explicit LogToServer(base::MessageLoopProxy* message_loop); | 34 explicit LogToServer(base::MessageLoopProxy* message_loop); |
| 35 virtual ~LogToServer(); | 35 virtual ~LogToServer(); |
| 36 | 36 |
| 37 // Logs a session state change. | 37 // Logs a session state change. |
| 38 // Currently, this is either connection or disconnection. | 38 // Currently, this is either connection or disconnection. |
| 39 void LogSessionStateChange(bool connected); | 39 void LogSessionStateChange(bool connected); |
| 40 | 40 |
| 41 // HostStatusObserver implementation. | 41 // HostStatusObserver implementation. |
| 42 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, | 42 virtual void OnSignallingConnected(SignalStrategy* signal_strategy) OVERRIDE; |
| 43 const std::string& full_jid) OVERRIDE; | |
| 44 virtual void OnSignallingDisconnected() OVERRIDE; | 43 virtual void OnSignallingDisconnected() OVERRIDE; |
| 45 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; | 44 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; |
| 46 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; | 45 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
| 47 virtual void OnAccessDenied() OVERRIDE; | 46 virtual void OnAccessDenied() OVERRIDE; |
| 48 virtual void OnShutdown() OVERRIDE; | 47 virtual void OnShutdown() OVERRIDE; |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 void Log(const ServerLogEntry& entry); | 50 void Log(const ServerLogEntry& entry); |
| 52 void SendPendingEntries(); | 51 void SendPendingEntries(); |
| 53 | 52 |
| 54 scoped_refptr<base::MessageLoopProxy> message_loop_; | 53 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 55 scoped_ptr<IqSender> iq_sender_; | 54 scoped_ptr<IqSender> iq_sender_; |
| 56 std::deque<ServerLogEntry> pending_entries_; | 55 std::deque<ServerLogEntry> pending_entries_; |
| 57 | 56 |
| 58 DISALLOW_COPY_AND_ASSIGN(LogToServer); | 57 DISALLOW_COPY_AND_ASSIGN(LogToServer); |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 } // namespace remoting | 60 } // namespace remoting |
| 62 | 61 |
| 63 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ | 62 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ |
| OLD | NEW |