| 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 <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "remoting/test/fake_network_dispatcher.h" | 13 #include "remoting/test/fake_network_dispatcher.h" |
| 14 #include "third_party/libjingle/source/talk/p2p/base/packetsocketfactory.h" | 14 #include "third_party/webrtc/p2p/base/packetsocketfactory.h" |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 | 17 |
| 18 class FakeNetworkDispatcher; | 18 class FakeNetworkDispatcher; |
| 19 class LeakyBucket; | 19 class LeakyBucket; |
| 20 | 20 |
| 21 class FakePacketSocketFactory : public rtc::PacketSocketFactory, | 21 class FakePacketSocketFactory : public rtc::PacketSocketFactory, |
| 22 public FakeNetworkDispatcher::Node { | 22 public FakeNetworkDispatcher::Node { |
| 23 public: | 23 public: |
| 24 // |dispatcher| must outlive the factory. | 24 // |dispatcher| must outlive the factory. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 std::list<PendingPacket> pending_packets_; | 114 std::list<PendingPacket> pending_packets_; |
| 115 | 115 |
| 116 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; | 116 base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); | 118 DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace remoting | 121 } // namespace remoting |
| 122 | 122 |
| 123 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ | 123 #endif // REMOTING_TEST_FAKE_SOCKET_FACTORY_H_ |
| OLD | NEW |