| 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> |
| 9 |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "base/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/completion_callback.h" | 12 #include "net/base/completion_callback.h" |
| 11 #include "third_party/libjingle/source/talk/base/sigslot.h" | 13 #include "third_party/libjingle/source/talk/base/sigslot.h" |
| 12 #include "webkit/glue/p2p_transport.h" | 14 #include "webkit/glue/p2p_transport.h" |
| 13 | 15 |
| 14 class P2PSocketDispatcher; | 16 class P2PSocketDispatcher; |
| 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; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 36 public: | 38 public: |
| 37 // Create P2PTransportImpl using specified NetworkManager and | 39 // Create P2PTransportImpl using specified NetworkManager and |
| 38 // PacketSocketFactory. Takes ownership of |network_manager| and | 40 // PacketSocketFactory. Takes ownership of |network_manager| and |
| 39 // |socket_factory|. | 41 // |socket_factory|. |
| 40 P2PTransportImpl(talk_base::NetworkManager* network_manager, | 42 P2PTransportImpl(talk_base::NetworkManager* network_manager, |
| 41 talk_base::PacketSocketFactory* socket_factory); | 43 talk_base::PacketSocketFactory* socket_factory); |
| 42 | 44 |
| 43 // Creates P2PTransportImpl using specified | 45 // Creates P2PTransportImpl using specified |
| 44 // P2PSocketDispatcher. This constructor creates IpcNetworkManager | 46 // P2PSocketDispatcher. This constructor creates IpcNetworkManager |
| 45 // and IpcPacketSocketFactory, and keeps ownership of these objects. | 47 // and IpcPacketSocketFactory, and keeps ownership of these objects. |
| 46 P2PTransportImpl(P2PSocketDispatcher* socket_dispatcher); | 48 explicit P2PTransportImpl(P2PSocketDispatcher* socket_dispatcher); |
| 47 | 49 |
| 48 virtual ~P2PTransportImpl(); | 50 virtual ~P2PTransportImpl(); |
| 49 | 51 |
| 50 // webkit_glue::P2PTransport interface. | 52 // webkit_glue::P2PTransport interface. |
| 51 virtual bool Init(const std::string& name, | 53 virtual bool Init(const std::string& name, |
| 52 Protocol protocol, | 54 Protocol protocol, |
| 53 const std::string& config, | 55 const std::string& config, |
| 54 EventHandler* event_handler) OVERRIDE; | 56 EventHandler* event_handler) OVERRIDE; |
| 55 virtual bool AddRemoteCandidate(const std::string& address) OVERRIDE; | 57 virtual bool AddRemoteCandidate(const std::string& address) OVERRIDE; |
| 56 virtual net::Socket* GetChannel() OVERRIDE; | 58 virtual net::Socket* GetChannel() OVERRIDE; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 82 | 84 |
| 83 scoped_ptr<jingle_glue::TransportChannelSocketAdapter> channel_adapter_; | 85 scoped_ptr<jingle_glue::TransportChannelSocketAdapter> channel_adapter_; |
| 84 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; | 86 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; |
| 85 | 87 |
| 86 net::CompletionCallbackImpl<P2PTransportImpl> connect_callback_; | 88 net::CompletionCallbackImpl<P2PTransportImpl> connect_callback_; |
| 87 | 89 |
| 88 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); | 90 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ | 93 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ |
| OLD | NEW |