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