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

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

Issue 1405963021: Add support for default local address in IpcNetworkManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix a sizeof Created 5 years, 1 month 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 int connected_socket_id); 83 int connected_socket_id);
84 void OnSend(int socket_id, 84 void OnSend(int socket_id,
85 const net::IPEndPoint& socket_address, 85 const net::IPEndPoint& socket_address,
86 const std::vector<char>& data, 86 const std::vector<char>& data,
87 const rtc::PacketOptions& options, 87 const rtc::PacketOptions& options,
88 uint64 packet_id); 88 uint64 packet_id);
89 void OnSetOption(int socket_id, P2PSocketOption option, int value); 89 void OnSetOption(int socket_id, P2PSocketOption option, int value);
90 void OnDestroySocket(int socket_id); 90 void OnDestroySocket(int socket_id);
91 91
92 void DoGetNetworkList(); 92 void DoGetNetworkList();
93 void SendNetworkList(const net::NetworkInterfaceList& list); 93 void SendNetworkList(const net::NetworkInterfaceList& list,
94 const net::IPAddressNumber& default_ipv4_local_address,
95 const net::IPAddressNumber& default_ipv6_local_address);
96
97 // This connects a UDP socket to a public IP address and gets local
98 // address. Since it binds to the "any" address (0.0.0.0 or ::) internally, it
99 // retrieves the default local address.
100 net::IPAddressNumber GetDefaultLocalAddress(int family);
94 101
95 void OnAddressResolved(DnsRequest* request, 102 void OnAddressResolved(DnsRequest* request,
96 const net::IPAddressList& addresses); 103 const net::IPAddressList& addresses);
97 104
98 void StopRtpDumpOnIOThread(bool incoming, bool outgoing); 105 void StopRtpDumpOnIOThread(bool incoming, bool outgoing);
99 106
100 content::ResourceContext* resource_context_; 107 content::ResourceContext* resource_context_;
101 scoped_refptr<net::URLRequestContextGetter> url_context_; 108 scoped_refptr<net::URLRequestContextGetter> url_context_;
102 109
103 SocketsMap sockets_; 110 SocketsMap sockets_;
104 111
105 bool monitoring_networks_; 112 bool monitoring_networks_;
106 113
107 std::set<DnsRequest*> dns_requests_; 114 std::set<DnsRequest*> dns_requests_;
108 P2PMessageThrottler throttler_; 115 P2PMessageThrottler throttler_;
109 116
117 net::IPAddressNumber default_ipv4_local_address_;
118 net::IPAddressNumber default_ipv6_local_address_;
119
110 bool dump_incoming_rtp_packet_; 120 bool dump_incoming_rtp_packet_;
111 bool dump_outgoing_rtp_packet_; 121 bool dump_outgoing_rtp_packet_;
112 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; 122 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_;
113 123
114 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); 124 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost);
115 }; 125 };
116 126
117 } // namespace content 127 } // namespace content
118 128
119 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ 129 #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