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_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/p2p_socket_type.h" | 10 #include "content/common/p2p_socket_type.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void StartRtpDump( | 85 void StartRtpDump( |
86 bool incoming, | 86 bool incoming, |
87 bool outgoing, | 87 bool outgoing, |
88 const RenderProcessHost::WebRtcRtpPacketCallback& packet_callback); | 88 const RenderProcessHost::WebRtcRtpPacketCallback& packet_callback); |
89 void StopRtpDump(bool incoming, bool outgoing); | 89 void StopRtpDump(bool incoming, bool outgoing); |
90 | 90 |
91 protected: | 91 protected: |
92 friend class P2PSocketHostTcpTestBase; | 92 friend class P2PSocketHostTcpTestBase; |
93 | 93 |
| 94 // This should match suffix IPProtocolType defined in histograms.xml. |
| 95 enum ProtocolType { UNKNOWN = 0, UDP = 0x1, TCP = 0x2 }; |
| 96 |
94 // TODO(mallinath) - Remove this below enum and use one defined in | 97 // TODO(mallinath) - Remove this below enum and use one defined in |
95 // libjingle/souce/talk/p2p/base/stun.h | 98 // libjingle/souce/talk/p2p/base/stun.h |
96 enum StunMessageType { | 99 enum StunMessageType { |
97 STUN_BINDING_REQUEST = 0x0001, | 100 STUN_BINDING_REQUEST = 0x0001, |
98 STUN_BINDING_RESPONSE = 0x0101, | 101 STUN_BINDING_RESPONSE = 0x0101, |
99 STUN_BINDING_ERROR_RESPONSE = 0x0111, | 102 STUN_BINDING_ERROR_RESPONSE = 0x0111, |
100 STUN_SHARED_SECRET_REQUEST = 0x0002, | 103 STUN_SHARED_SECRET_REQUEST = 0x0002, |
101 STUN_SHARED_SECRET_RESPONSE = 0x0102, | 104 STUN_SHARED_SECRET_RESPONSE = 0x0102, |
102 STUN_SHARED_SECRET_ERROR_RESPONSE = 0x0112, | 105 STUN_SHARED_SECRET_ERROR_RESPONSE = 0x0112, |
103 STUN_ALLOCATE_REQUEST = 0x0003, | 106 STUN_ALLOCATE_REQUEST = 0x0003, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 147 |
145 IPC::Sender* message_sender_; | 148 IPC::Sender* message_sender_; |
146 int id_; | 149 int id_; |
147 State state_; | 150 State state_; |
148 bool dump_incoming_rtp_packet_; | 151 bool dump_incoming_rtp_packet_; |
149 bool dump_outgoing_rtp_packet_; | 152 bool dump_outgoing_rtp_packet_; |
150 RenderProcessHost::WebRtcRtpPacketCallback packet_dump_callback_; | 153 RenderProcessHost::WebRtcRtpPacketCallback packet_dump_callback_; |
151 | 154 |
152 base::WeakPtrFactory<P2PSocketHost> weak_ptr_factory_; | 155 base::WeakPtrFactory<P2PSocketHost> weak_ptr_factory_; |
153 | 156 |
| 157 uint32 send_queue_length_max_; |
| 158 ProtocolType protocol_type_; |
| 159 |
154 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); | 160 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); |
155 }; | 161 }; |
156 | 162 |
157 } // namespace content | 163 } // namespace content |
158 | 164 |
159 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ | 165 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
OLD | NEW |