| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ | 6 #define CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "content/common/content_export.h" |
| 12 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 13 #include "third_party/libjingle/source/talk/base/sigslot.h" | 15 #include "third_party/libjingle/source/talk/base/sigslot.h" |
| 14 #include "webkit/glue/p2p_transport.h" | 16 #include "webkit/glue/p2p_transport.h" |
| 15 | 17 |
| 16 namespace cricket { | 18 namespace cricket { |
| 17 class Candidate; | 19 class Candidate; |
| 18 class PortAllocator; | 20 class PortAllocator; |
| 19 class P2PTransportChannel; | 21 class P2PTransportChannel; |
| 20 class TransportChannel; | 22 class TransportChannel; |
| 21 class TransportChannelImpl; | 23 class TransportChannelImpl; |
| 22 } // namespace cricket | 24 } // namespace cricket |
| 23 | 25 |
| 24 namespace jingle_glue { | 26 namespace jingle_glue { |
| 25 class TransportChannelSocketAdapter; | 27 class TransportChannelSocketAdapter; |
| 26 class PseudoTcpAdapter; | 28 class PseudoTcpAdapter; |
| 27 } // namespace jingle_glue | 29 } // namespace jingle_glue |
| 28 | 30 |
| 29 namespace talk_base { | 31 namespace talk_base { |
| 30 class NetworkManager; | 32 class NetworkManager; |
| 31 class PacketSocketFactory; | 33 class PacketSocketFactory; |
| 32 } // namespace talk_base | 34 } // namespace talk_base |
| 33 | 35 |
| 34 namespace content { | 36 namespace content { |
| 35 | 37 |
| 36 class P2PPortAllocator; | 38 class P2PPortAllocator; |
| 37 class P2PSocketDispatcher; | 39 class P2PSocketDispatcher; |
| 38 | 40 |
| 39 class P2PTransportImpl : public webkit_glue::P2PTransport, | 41 class CONTENT_EXPORT P2PTransportImpl |
| 40 public sigslot::has_slots<> { | 42 : NON_EXPORTED_BASE(public webkit_glue::P2PTransport), |
| 43 public sigslot::has_slots<> { |
| 41 public: | 44 public: |
| 42 // Creates P2PTransportImpl using specified NetworkManager and | 45 // Creates P2PTransportImpl using specified NetworkManager and |
| 43 // PacketSocketFactory. Takes ownership of |network_manager| and | 46 // PacketSocketFactory. Takes ownership of |network_manager| and |
| 44 // |socket_factory|. Provided to be used for tests only. | 47 // |socket_factory|. Provided to be used for tests only. |
| 45 P2PTransportImpl(talk_base::NetworkManager* network_manager, | 48 P2PTransportImpl(talk_base::NetworkManager* network_manager, |
| 46 talk_base::PacketSocketFactory* socket_factory); | 49 talk_base::PacketSocketFactory* socket_factory); |
| 47 | 50 |
| 48 // Creates P2PTransportImpl using specified | 51 // Creates P2PTransportImpl using specified |
| 49 // P2PSocketDispatcher. This constructor creates IpcNetworkManager | 52 // P2PSocketDispatcher. This constructor creates IpcNetworkManager |
| 50 // and IpcPacketSocketFactory, and keeps ownership of these objects. | 53 // and IpcPacketSocketFactory, and keeps ownership of these objects. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; | 90 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; |
| 88 | 91 |
| 89 net::CompletionCallbackImpl<P2PTransportImpl> connect_callback_; | 92 net::CompletionCallbackImpl<P2PTransportImpl> connect_callback_; |
| 90 | 93 |
| 91 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); | 94 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace content | 97 } // namespace content |
| 95 | 98 |
| 96 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ | 99 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ |
| OLD | NEW |