Chromium Code Reviews| Index: remoting/host/heartbeat_sender.h |
| diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h |
| index f2f5a474aafe40056c59637b9c878bd0f035a7fd..560179c39273bfa7694f2743adb5469db005db3e 100644 |
| --- a/remoting/host/heartbeat_sender.h |
| +++ b/remoting/host/heartbeat_sender.h |
| @@ -79,10 +79,18 @@ class IqSender; |
| // </iq> |
| class HeartbeatSender : public SignalStrategy::Listener { |
| public: |
| - // |signal_strategy| and |key_pair| must outlive this |
| + class Delegate { |
|
simonmorris
2012/04/17 19:52:30
Optional nit: maybe "Listener" instead of "Delegat
alexeypa (please no reviews)
2012/04/17 20:01:05
Done.
|
| + public: |
| + virtual ~Delegate() { } |
| + // Invoked when the host ID is permanently not recognized by the server. |
| + virtual void OnUnknownHostIdError() = 0; |
| + }; |
| + |
| + // |signal_strategy|, |key_pair| and |delegate| must outlive this |
| // object. Heartbeats will start when the supplied SignalStrategy |
| // enters the CONNECTED state. |
| - HeartbeatSender(const std::string& host_id, |
| + HeartbeatSender(Delegate* delegate, |
| + const std::string& host_id, |
| SignalStrategy* signal_strategy, |
| HostKeyPair* key_pair); |
| virtual ~HeartbeatSender(); |
| @@ -111,6 +119,7 @@ class HeartbeatSender : public SignalStrategy::Listener { |
| scoped_ptr<buzz::XmlElement> CreateHeartbeatMessage(); |
| scoped_ptr<buzz::XmlElement> CreateSignature(); |
| + Delegate* delegate_; |
| std::string host_id_; |
| SignalStrategy* signal_strategy_; |
| HostKeyPair* key_pair_; |