| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compiler_specific.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const std::string& name, | 59 const std::string& name, |
| 60 Protocol protocol, | 60 Protocol protocol, |
| 61 const Config& config, | 61 const Config& config, |
| 62 EventHandler* event_handler) OVERRIDE; | 62 EventHandler* event_handler) OVERRIDE; |
| 63 virtual bool AddRemoteCandidate(const std::string& address) OVERRIDE; | 63 virtual bool AddRemoteCandidate(const std::string& address) OVERRIDE; |
| 64 virtual net::Socket* GetChannel() OVERRIDE; | 64 virtual net::Socket* GetChannel() OVERRIDE; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 class ChannelAdapter; | 67 class ChannelAdapter; |
| 68 | 68 |
| 69 void OnRequestSignaling(); | 69 void OnRequestSignaling(cricket::TransportChannelImpl* channel); |
| 70 void OnCandidateReady(cricket::TransportChannelImpl* channel, | 70 void OnCandidateReady(cricket::TransportChannelImpl* channel, |
| 71 const cricket::Candidate& candidate); | 71 const cricket::Candidate& candidate); |
| 72 void OnReadableState(cricket::TransportChannel* channel); | 72 void OnReadableState(cricket::TransportChannel* channel); |
| 73 void OnWriteableState(cricket::TransportChannel* channel); | 73 void OnWriteableState(cricket::TransportChannel* channel); |
| 74 | 74 |
| 75 void OnTcpConnected(int result); | 75 void OnTcpConnected(int result); |
| 76 | 76 |
| 77 P2PSocketDispatcher* socket_dispatcher_; | 77 P2PSocketDispatcher* socket_dispatcher_; |
| 78 std::string name_; | 78 std::string name_; |
| 79 EventHandler* event_handler_; | 79 EventHandler* event_handler_; |
| 80 State state_; | 80 State state_; |
| 81 | 81 |
| 82 scoped_ptr<talk_base::NetworkManager> network_manager_; | 82 scoped_ptr<talk_base::NetworkManager> network_manager_; |
| 83 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; | 83 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; |
| 84 | 84 |
| 85 scoped_ptr<cricket::PortAllocator> allocator_; | 85 scoped_ptr<cricket::PortAllocator> allocator_; |
| 86 scoped_ptr<cricket::P2PTransportChannel> channel_; | 86 scoped_ptr<cricket::P2PTransportChannel> channel_; |
| 87 | 87 |
| 88 scoped_ptr<jingle_glue::TransportChannelSocketAdapter> channel_adapter_; | 88 scoped_ptr<jingle_glue::TransportChannelSocketAdapter> channel_adapter_; |
| 89 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; | 89 scoped_ptr<jingle_glue::PseudoTcpAdapter> pseudo_tcp_adapter_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); | 91 DISALLOW_COPY_AND_ASSIGN(P2PTransportImpl); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace content | 94 } // namespace content |
| 95 | 95 |
| 96 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ | 96 #endif // CONTENT_RENDERER_P2P_P2P_TRANSPORT_IMPL_H_ |
| OLD | NEW |