| Index: trunk/src/content/browser/renderer_host/p2p/socket_host.h
|
| ===================================================================
|
| --- trunk/src/content/browser/renderer_host/p2p/socket_host.h (revision 273764)
|
| +++ trunk/src/content/browser/renderer_host/p2p/socket_host.h (working copy)
|
| @@ -5,10 +5,8 @@
|
| #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
|
| #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
|
|
|
| -#include "base/memory/weak_ptr.h"
|
| #include "content/common/content_export.h"
|
| #include "content/common/p2p_socket_type.h"
|
| -#include "content/public/browser/render_process_host.h"
|
| #include "net/base/ip_endpoint.h"
|
| #include "net/udp/datagram_socket.h"
|
|
|
| @@ -39,8 +37,7 @@
|
|
|
| // Helper method which finds RTP ofset and length if the packet is encapsulated
|
| // in a TURN Channel Message or TURN Send Indication message.
|
| -CONTENT_EXPORT bool GetRtpPacketStartPositionAndLength(const char* data,
|
| - int length,
|
| +CONTENT_EXPORT bool GetRtpPacketStartPositionAndLength(char* data, int length,
|
| int* rtp_start_pos,
|
| int* rtp_packet_length);
|
| // Helper method which updates absoulute send time extension if present.
|
| @@ -56,8 +53,7 @@
|
| static const int kStunHeaderSize = 20;
|
| // Creates P2PSocketHost of the specific type.
|
| static P2PSocketHost* Create(IPC::Sender* message_sender,
|
| - int socket_id,
|
| - P2PSocketType type,
|
| + int id, P2PSocketType type,
|
| net::URLRequestContextGetter* url_context,
|
| P2PMessageThrottler* throttler);
|
|
|
| @@ -78,12 +74,6 @@
|
|
|
| virtual bool SetOption(P2PSocketOption option, int value) = 0;
|
|
|
| - void StartRtpDump(
|
| - bool incoming,
|
| - bool outgoing,
|
| - const RenderProcessHost::WebRtcRtpPacketCallback& packet_callback);
|
| - void StopRtpDump(bool incoming, bool outgoing);
|
| -
|
| protected:
|
| friend class P2PSocketHostTcpTestBase;
|
|
|
| @@ -121,7 +111,7 @@
|
| STATE_ERROR,
|
| };
|
|
|
| - P2PSocketHost(IPC::Sender* message_sender, int socket_id);
|
| + P2PSocketHost(IPC::Sender* message_sender, int id);
|
|
|
| // Verifies that the packet |data| has a valid STUN header. In case
|
| // of success stores type of the message in |type|.
|
| @@ -129,24 +119,10 @@
|
| StunMessageType* type);
|
| static bool IsRequestOrResponse(StunMessageType type);
|
|
|
| - // Calls |packet_dump_callback_| to record the RTP header.
|
| - void DumpRtpPacket(const char* packet, size_t length, bool incoming);
|
| -
|
| - // A helper to dump the packet on the IO thread.
|
| - void DumpRtpPacketOnIOThread(scoped_ptr<uint8[]> packet_header,
|
| - size_t header_length,
|
| - size_t packet_length,
|
| - bool incoming);
|
| -
|
| IPC::Sender* message_sender_;
|
| int id_;
|
| State state_;
|
| - bool dump_incoming_rtp_packet_;
|
| - bool dump_outgoing_rtp_packet_;
|
| - RenderProcessHost::WebRtcRtpPacketCallback packet_dump_callback_;
|
|
|
| - base::WeakPtrFactory<P2PSocketHost> weak_ptr_factory_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
|
| };
|
|
|
|
|