Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: content/browser/renderer_host/p2p/socket_dispatcher_host.h

Issue 1833523002: Migrate content/*/p2p/* code to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments sergeyu Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void OnSend(int socket_id, 87 void OnSend(int socket_id,
88 const net::IPEndPoint& socket_address, 88 const net::IPEndPoint& socket_address,
89 const std::vector<char>& data, 89 const std::vector<char>& data,
90 const rtc::PacketOptions& options, 90 const rtc::PacketOptions& options,
91 uint64_t packet_id); 91 uint64_t packet_id);
92 void OnSetOption(int socket_id, P2PSocketOption option, int value); 92 void OnSetOption(int socket_id, P2PSocketOption option, int value);
93 void OnDestroySocket(int socket_id); 93 void OnDestroySocket(int socket_id);
94 94
95 void DoGetNetworkList(); 95 void DoGetNetworkList();
96 void SendNetworkList(const net::NetworkInterfaceList& list, 96 void SendNetworkList(const net::NetworkInterfaceList& list,
97 const net::IPAddressNumber& default_ipv4_local_address, 97 const net::IPAddress& default_ipv4_local_address,
98 const net::IPAddressNumber& default_ipv6_local_address); 98 const net::IPAddress& default_ipv6_local_address);
99 99
100 // This connects a UDP socket to a public IP address and gets local 100 // This connects a UDP socket to a public IP address and gets local
101 // address. Since it binds to the "any" address (0.0.0.0 or ::) internally, it 101 // address. Since it binds to the "any" address (0.0.0.0 or ::) internally, it
102 // retrieves the default local address. 102 // retrieves the default local address.
103 net::IPAddressNumber GetDefaultLocalAddress(int family); 103 net::IPAddress GetDefaultLocalAddress(int family);
104 104
105 void OnAddressResolved(DnsRequest* request, 105 void OnAddressResolved(DnsRequest* request,
106 const net::IPAddressList& addresses); 106 const net::IPAddressList& addresses);
107 107
108 void StopRtpDumpOnIOThread(bool incoming, bool outgoing); 108 void StopRtpDumpOnIOThread(bool incoming, bool outgoing);
109 109
110 content::ResourceContext* resource_context_; 110 content::ResourceContext* resource_context_;
111 scoped_refptr<net::URLRequestContextGetter> url_context_; 111 scoped_refptr<net::URLRequestContextGetter> url_context_;
112 112
113 SocketsMap sockets_; 113 SocketsMap sockets_;
114 114
115 bool monitoring_networks_; 115 bool monitoring_networks_;
116 116
117 std::set<DnsRequest*> dns_requests_; 117 std::set<DnsRequest*> dns_requests_;
118 P2PMessageThrottler throttler_; 118 P2PMessageThrottler throttler_;
119 119
120 net::IPAddressNumber default_ipv4_local_address_; 120 net::IPAddress default_ipv4_local_address_;
121 net::IPAddressNumber default_ipv6_local_address_; 121 net::IPAddress default_ipv6_local_address_;
122 122
123 bool dump_incoming_rtp_packet_; 123 bool dump_incoming_rtp_packet_;
124 bool dump_outgoing_rtp_packet_; 124 bool dump_outgoing_rtp_packet_;
125 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; 125 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); 127 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost);
128 }; 128 };
129 129
130 } // namespace content 130 } // namespace content
131 131
132 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ 132 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698