OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ | 5 #ifndef REMOTING_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ |
6 #define REMOTING_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ | 6 #define REMOTING_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 scoped_ptr<buzz::XmlElement> stanza); | 65 scoped_ptr<buzz::XmlElement> stanza); |
66 | 66 |
67 // Called by the |peer_|. Takes ownership of |stanza|. | 67 // Called by the |peer_|. Takes ownership of |stanza|. |
68 void OnIncomingMessage(scoped_ptr<buzz::XmlElement> stanza); | 68 void OnIncomingMessage(scoped_ptr<buzz::XmlElement> stanza); |
69 void SetPeerCallback(const PeerCallback& peer_callback); | 69 void SetPeerCallback(const PeerCallback& peer_callback); |
70 | 70 |
71 scoped_refptr<base::SingleThreadTaskRunner> main_thread_; | 71 scoped_refptr<base::SingleThreadTaskRunner> main_thread_; |
72 | 72 |
73 std::string jid_; | 73 std::string jid_; |
74 PeerCallback peer_callback_; | 74 PeerCallback peer_callback_; |
75 ObserverList<Listener, true> listeners_; | 75 base::ObserverList<Listener, true> listeners_; |
76 | 76 |
77 int last_id_; | 77 int last_id_; |
78 | 78 |
79 base::TimeDelta send_delay_; | 79 base::TimeDelta send_delay_; |
80 | 80 |
81 // All received messages, includes thouse still in |pending_messages_|. | 81 // All received messages, includes thouse still in |pending_messages_|. |
82 std::list<buzz::XmlElement*> received_messages_; | 82 std::list<buzz::XmlElement*> received_messages_; |
83 | 83 |
84 base::WeakPtrFactory<FakeSignalStrategy> weak_factory_; | 84 base::WeakPtrFactory<FakeSignalStrategy> weak_factory_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(FakeSignalStrategy); | 86 DISALLOW_COPY_AND_ASSIGN(FakeSignalStrategy); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace remoting | 89 } // namespace remoting |
90 | 90 |
91 #endif // REMOTING_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ | 91 #endif // REMOTING_SIGNALING_FAKE_SIGNAL_STRATEGY_H_ |
OLD | NEW |