Chromium Code Reviews| 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..b44bc419ebd2d69d1cf94ab2dee56634d178d4af 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; |
| +} // content |
|
awong
2011/08/09 00:25:56
namespace content
Sergey Ulanov
2011/08/09 00:41:35
Done.
|
| + |
| 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); |
| }; |