| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
| 11 #include <set> | 12 #include <set> |
| 12 #include <string> | 13 #include <string> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" | 17 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" |
| 17 #include "content/common/p2p_socket_type.h" | 18 #include "content/common/p2p_socket_type.h" |
| 18 #include "content/public/browser/browser_message_filter.h" | 19 #include "content/public/browser/browser_message_filter.h" |
| 19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 20 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Stops the RTP packet header dumping. Must be Called on the UI thread. | 60 // Stops the RTP packet header dumping. Must be Called on the UI thread. |
| 60 void StopRtpDumpOnUIThread(bool incoming, bool outgoing); | 61 void StopRtpDumpOnUIThread(bool incoming, bool outgoing); |
| 61 | 62 |
| 62 protected: | 63 protected: |
| 63 ~P2PSocketDispatcherHost() override; | 64 ~P2PSocketDispatcherHost() override; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 67 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
| 67 friend class base::DeleteHelper<P2PSocketDispatcherHost>; | 68 friend class base::DeleteHelper<P2PSocketDispatcherHost>; |
| 68 | 69 |
| 69 typedef std::map<int, P2PSocketHost*> SocketsMap; | 70 typedef std::map<int, std::unique_ptr<P2PSocketHost>> SocketsMap; |
| 70 | 71 |
| 71 class DnsRequest; | 72 class DnsRequest; |
| 72 | 73 |
| 73 P2PSocketHost* LookupSocket(int socket_id); | 74 P2PSocketHost* LookupSocket(int socket_id); |
| 74 | 75 |
| 75 // Handlers for the messages coming from the renderer. | 76 // Handlers for the messages coming from the renderer. |
| 76 void OnStartNetworkNotifications(); | 77 void OnStartNetworkNotifications(); |
| 77 void OnStopNetworkNotifications(); | 78 void OnStopNetworkNotifications(); |
| 78 void OnGetHostAddress(const std::string& host_name, int32_t request_id); | 79 void OnGetHostAddress(const std::string& host_name, int32_t request_id); |
| 79 | 80 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool dump_incoming_rtp_packet_; | 125 bool dump_incoming_rtp_packet_; |
| 125 bool dump_outgoing_rtp_packet_; | 126 bool dump_outgoing_rtp_packet_; |
| 126 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; | 127 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; |
| 127 | 128 |
| 128 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); | 129 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); |
| 129 }; | 130 }; |
| 130 | 131 |
| 131 } // namespace content | 132 } // namespace content |
| 132 | 133 |
| 133 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ | 134 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ |
| OLD | NEW |