| 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_TEST_FAKE_SOCKET_FACTORY_H_ | 5 #ifndef REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| 6 #define REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 6 #define REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 int data_size) override; | 79 int data_size) override; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 struct PendingPacket { | 82 struct PendingPacket { |
| 83 PendingPacket(); | 83 PendingPacket(); |
| 84 PendingPacket( | 84 PendingPacket( |
| 85 const rtc::SocketAddress& from, | 85 const rtc::SocketAddress& from, |
| 86 const rtc::SocketAddress& to, | 86 const rtc::SocketAddress& to, |
| 87 const scoped_refptr<net::IOBuffer>& data, | 87 const scoped_refptr<net::IOBuffer>& data, |
| 88 int data_size); | 88 int data_size); |
| 89 PendingPacket(const PendingPacket& other); |
| 89 ~PendingPacket(); | 90 ~PendingPacket(); |
| 90 | 91 |
| 91 rtc::SocketAddress from; | 92 rtc::SocketAddress from; |
| 92 rtc::SocketAddress to; | 93 rtc::SocketAddress to; |
| 93 scoped_refptr<net::IOBuffer> data; | 94 scoped_refptr<net::IOBuffer> data; |
| 94 int data_size; | 95 int data_size; |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 typedef base::Callback<void(const rtc::SocketAddress& from, | 98 typedef base::Callback<void(const rtc::SocketAddress& from, |
| 98 const rtc::SocketAddress& to, | 99 const rtc::SocketAddress& to, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 118 std::list<PendingPacket> pending_packets_; | 119 std::list<PendingPacket> pending_packets_; |
| 119 | 120 |
| 120 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; | 121 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; |
| 121 | 122 |
| 122 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); | 123 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace remoting | 126 } // namespace remoting |
| 126 | 127 |
| 127 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 128 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| OLD | NEW |