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_HEARTBEAT_SENDER_H_ | 5 #ifndef REMOTING_HOST_HEARTBEAT_SENDER_H_ |
6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_ | 6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // enters the CONNECTED state. | 91 // enters the CONNECTED state. |
92 HeartbeatSender(Listener* listener, | 92 HeartbeatSender(Listener* listener, |
93 const std::string& host_id, | 93 const std::string& host_id, |
94 SignalStrategy* signal_strategy, | 94 SignalStrategy* signal_strategy, |
95 HostKeyPair* key_pair); | 95 HostKeyPair* key_pair); |
96 virtual ~HeartbeatSender(); | 96 virtual ~HeartbeatSender(); |
97 | 97 |
98 // SignalStrategy::Listener interface. | 98 // SignalStrategy::Listener interface. |
99 virtual void OnSignalStrategyStateChange( | 99 virtual void OnSignalStrategyStateChange( |
100 SignalStrategy::State state) OVERRIDE; | 100 SignalStrategy::State state) OVERRIDE; |
| 101 virtual bool OnSignalStrategyIncomingStanza( |
| 102 const buzz::XmlElement* stanza) OVERRIDE; |
101 | 103 |
102 private: | 104 private: |
103 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); | 105 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); |
104 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, | 106 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, |
105 DoSendStanzaWithExpectedSequenceId); | 107 DoSendStanzaWithExpectedSequenceId); |
106 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); | 108 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); |
107 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval); | 109 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponseSetInterval); |
108 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, | 110 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, |
109 ProcessResponseExpectedSequenceId); | 111 ProcessResponseExpectedSequenceId); |
110 | 112 |
(...skipping 22 matching lines...) Expand all Loading... |
133 int sequence_id_recent_set_num_; | 135 int sequence_id_recent_set_num_; |
134 bool heartbeat_succeeded_; | 136 bool heartbeat_succeeded_; |
135 int failed_startup_heartbeat_count_; | 137 int failed_startup_heartbeat_count_; |
136 | 138 |
137 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); | 139 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); |
138 }; | 140 }; |
139 | 141 |
140 } // namespace remoting | 142 } // namespace remoting |
141 | 143 |
142 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ | 144 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ |
OLD | NEW |