Index: content/browser/renderer_host/p2p/socket_dispatcher_host.h |
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.h b/content/browser/renderer_host/p2p/socket_dispatcher_host.h |
index e704e9d986a75a0bea509bdeea27c18d4f94684b..54a91c6260ee271dcb715d6b32ce9d6317d7e465 100644 |
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.h |
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.h |
@@ -12,13 +12,17 @@ |
#include "net/base/ip_endpoint.h" |
#include "net/base/network_change_notifier.h" |
+namespace content { |
+class ResourceContext; |
+} // namespace content |
+ |
class P2PSocketHost; |
class P2PSocketDispatcherHost |
: public BrowserMessageFilter, |
public net::NetworkChangeNotifier::IPAddressObserver { |
public: |
- P2PSocketDispatcherHost(); |
+ P2PSocketDispatcherHost(const content::ResourceContext* resource_context); |
virtual ~P2PSocketDispatcherHost(); |
// BrowserMessageFilter overrides. |
@@ -34,12 +38,18 @@ class P2PSocketDispatcherHost |
typedef std::pair<int32, int> ExtendedSocketId; |
typedef std::map<ExtendedSocketId, P2PSocketHost*> SocketsMap; |
+ class DnsRequest; |
+ |
P2PSocketHost* LookupSocket(int32 routing_id, int socket_id); |
// Handlers for the messages coming from the renderer. |
void OnStartNetworkNotifications(const IPC::Message& msg); |
void OnStopNetworkNotifications(const IPC::Message& msg); |
+ void OnGetHostAddress(const IPC::Message& msg, |
+ const std::string& host_name, |
+ int32 request_id); |
+ |
void OnCreateSocket(const IPC::Message& msg, |
P2PSocketType type, |
int socket_id, |
@@ -57,6 +67,11 @@ class P2PSocketDispatcherHost |
void DoGetNetworkList(); |
void SendNetworkList(const net::NetworkInterfaceList& list); |
+ void OnAddressResolved(DnsRequest* request, |
+ const net::IPAddressNumber& result); |
+ |
+ const content::ResourceContext* resource_context_; |
+ |
SocketsMap sockets_; |
bool monitoring_networks_; |
@@ -65,6 +80,8 @@ class P2PSocketDispatcherHost |
// network list notifications. |
std::set<int> notifications_routing_ids_; |
+ std::set<DnsRequest*> dns_requests_; |
+ |
DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); |
}; |