| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HOST_EVENT_LOGGER_H_ | 5 #ifndef REMOTING_HOST_HOST_EVENT_LOGGER_H_ |
| 6 #define REMOTING_HOST_HOST_EVENT_LOGGER_H_ | 6 #define REMOTING_HOST_HOST_EVENT_LOGGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "remoting/host/host_status_observer.h" | 12 #include "remoting/host/host_status_observer.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 | 15 |
| 16 class ChromotingHost; | 16 class ChromotingHost; |
| 17 | 17 |
| 18 class HostEventLogger : public HostStatusObserver { | 18 class HostEventLogger : public HostStatusObserver { |
| 19 public: | 19 public: |
| 20 HostEventLogger(ChromotingHost* host); | 20 HostEventLogger(ChromotingHost* host); |
| 21 virtual ~HostEventLogger(); | 21 virtual ~HostEventLogger(); |
| 22 | 22 |
| 23 // HostStatusObserver implementation. These methods will be called from the | 23 // HostStatusObserver implementation. These methods will be called from the |
| 24 // network thread. | 24 // network thread. |
| 25 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; | 25 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; |
| 26 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; | 26 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
| 27 virtual void OnAccessDenied() OVERRIDE; | 27 virtual void OnAccessDenied(const std::string& jid) OVERRIDE; |
| 28 virtual void OnShutdown() OVERRIDE; | 28 virtual void OnShutdown() OVERRIDE; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 scoped_refptr<ChromotingHost> host_; | 31 scoped_refptr<ChromotingHost> host_; |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(HostEventLogger); | 33 DISALLOW_COPY_AND_ASSIGN(HostEventLogger); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } | 36 } |
| 37 | 37 |
| 38 #endif // REMOTING_HOST_HOST_EVENT_LOGGER_H_ | 38 #endif // REMOTING_HOST_HOST_EVENT_LOGGER_H_ |
| OLD | NEW |