| OLD | NEW | 
|    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> | 
|   11 #include <vector> |   11 #include <vector> | 
|   12  |   12  | 
|   13 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" |   13 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" | 
|   14 #include "content/common/p2p_socket_type.h" |   14 #include "content/common/p2p_socket_type.h" | 
|   15 #include "content/public/browser/browser_message_filter.h" |   15 #include "content/public/browser/browser_message_filter.h" | 
|   16 #include "content/public/browser/browser_thread.h" |   16 #include "content/public/browser/browser_thread.h" | 
 |   17 #include "content/public/browser/render_process_host.h" | 
|   17 #include "net/base/ip_endpoint.h" |   18 #include "net/base/ip_endpoint.h" | 
|   18 #include "net/base/network_change_notifier.h" |   19 #include "net/base/network_change_notifier.h" | 
|   19  |   20  | 
|   20 namespace net { |   21 namespace net { | 
|   21 class URLRequestContextGetter; |   22 class URLRequestContextGetter; | 
|   22 } |   23 } | 
|   23  |   24  | 
|   24 namespace talk_base { |   25 namespace talk_base { | 
|   25 struct PacketOptions; |   26 struct PacketOptions; | 
|   26 } |   27 } | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|   39  |   40  | 
|   40   // content::BrowserMessageFilter overrides. |   41   // content::BrowserMessageFilter overrides. | 
|   41   virtual void OnChannelClosing() OVERRIDE; |   42   virtual void OnChannelClosing() OVERRIDE; | 
|   42   virtual void OnDestruct() const OVERRIDE; |   43   virtual void OnDestruct() const OVERRIDE; | 
|   43   virtual bool OnMessageReceived(const IPC::Message& message, |   44   virtual bool OnMessageReceived(const IPC::Message& message, | 
|   44                                  bool* message_was_ok) OVERRIDE; |   45                                  bool* message_was_ok) OVERRIDE; | 
|   45  |   46  | 
|   46   // net::NetworkChangeNotifier::IPAddressObserver interface. |   47   // net::NetworkChangeNotifier::IPAddressObserver interface. | 
|   47   virtual void OnIPAddressChanged() OVERRIDE; |   48   virtual void OnIPAddressChanged() OVERRIDE; | 
|   48  |   49  | 
 |   50   // Start or stop the RTP packet header dumping. Must be called on the IO | 
 |   51   // thread. | 
 |   52   void StartRtpDump( | 
 |   53       RtpDumpType type, | 
 |   54       const RenderProcessHost::WebRtcRtpPacketCallback& packet_callback); | 
 |   55  | 
 |   56   void StopRtpDump(RtpDumpType type); | 
 |   57  | 
|   49  protected: |   58  protected: | 
|   50   virtual ~P2PSocketDispatcherHost(); |   59   virtual ~P2PSocketDispatcherHost(); | 
|   51  |   60  | 
|   52  private: |   61  private: | 
|   53   friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |   62   friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 
|   54   friend class base::DeleteHelper<P2PSocketDispatcherHost>; |   63   friend class base::DeleteHelper<P2PSocketDispatcherHost>; | 
|   55  |   64  | 
|   56   typedef std::map<int, P2PSocketHost*> SocketsMap; |   65   typedef std::map<int, P2PSocketHost*> SocketsMap; | 
|   57  |   66  | 
|   58   class DnsRequest; |   67   class DnsRequest; | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   90   content::ResourceContext* resource_context_; |   99   content::ResourceContext* resource_context_; | 
|   91   scoped_refptr<net::URLRequestContextGetter> url_context_; |  100   scoped_refptr<net::URLRequestContextGetter> url_context_; | 
|   92  |  101  | 
|   93   SocketsMap sockets_; |  102   SocketsMap sockets_; | 
|   94  |  103  | 
|   95   bool monitoring_networks_; |  104   bool monitoring_networks_; | 
|   96  |  105  | 
|   97   std::set<DnsRequest*> dns_requests_; |  106   std::set<DnsRequest*> dns_requests_; | 
|   98   P2PMessageThrottler throttler_; |  107   P2PMessageThrottler throttler_; | 
|   99  |  108  | 
 |  109   bool dump_incoming_rtp_packet_; | 
 |  110   bool dump_outgoing_rtp_packet_; | 
 |  111   RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; | 
 |  112  | 
|  100   DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); |  113   DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); | 
|  101 }; |  114 }; | 
|  102  |  115  | 
|  103 }  // namespace content |  116 }  // namespace content | 
|  104  |  117  | 
|  105 #endif  // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ |  118 #endif  // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ | 
| OLD | NEW |