| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CHANGE_NOTIFICATION_LISTENER_H | 5 #ifndef REMOTING_HOST_HOST_CHANGE_NOTIFICATION_LISTENER_H |
| 6 #define REMOTING_HOST_HOST_CHANGE_NOTIFICATION_LISTENER_H | 6 #define REMOTING_HOST_HOST_CHANGE_NOTIFICATION_LISTENER_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // Both listener and signal_strategy are expected to outlive this object. | 35 // Both listener and signal_strategy are expected to outlive this object. |
| 36 HostChangeNotificationListener(Listener* listener, | 36 HostChangeNotificationListener(Listener* listener, |
| 37 const std::string& host_id, | 37 const std::string& host_id, |
| 38 SignalStrategy* signal_strategy, | 38 SignalStrategy* signal_strategy, |
| 39 const std::string& directory_bot_jid); | 39 const std::string& directory_bot_jid); |
| 40 virtual ~HostChangeNotificationListener(); | 40 virtual ~HostChangeNotificationListener(); |
| 41 | 41 |
| 42 // SignalStrategy::Listener interface. | 42 // SignalStrategy::Listener interface. |
| 43 virtual void OnSignalStrategyStateChange( | 43 virtual void OnSignalStrategyStateChange( |
| 44 SignalStrategy::State state) OVERRIDE; | 44 SignalStrategy::State state) override; |
| 45 virtual bool OnSignalStrategyIncomingStanza( | 45 virtual bool OnSignalStrategyIncomingStanza( |
| 46 const buzz::XmlElement* stanza) OVERRIDE; | 46 const buzz::XmlElement* stanza) override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void OnHostDeleted(); | 49 void OnHostDeleted(); |
| 50 | 50 |
| 51 Listener* listener_; | 51 Listener* listener_; |
| 52 std::string host_id_; | 52 std::string host_id_; |
| 53 SignalStrategy* signal_strategy_; | 53 SignalStrategy* signal_strategy_; |
| 54 std::string directory_bot_jid_; | 54 std::string directory_bot_jid_; |
| 55 base::WeakPtrFactory<HostChangeNotificationListener> weak_factory_; | 55 base::WeakPtrFactory<HostChangeNotificationListener> weak_factory_; |
| 56 DISALLOW_COPY_AND_ASSIGN(HostChangeNotificationListener); | 56 DISALLOW_COPY_AND_ASSIGN(HostChangeNotificationListener); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace remoting | 59 } // namespace remoting |
| 60 | 60 |
| 61 #endif // REMOTING_HOST_HOST_CHANGE_NOTIFICATION_LISTENER_H | 61 #endif // REMOTING_HOST_HOST_CHANGE_NOTIFICATION_LISTENER_H |
| OLD | NEW |