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 <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/task_scheduler/post_task.h" | |
17 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" | 18 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" |
18 #include "content/common/p2p_socket_type.h" | 19 #include "content/common/p2p_socket_type.h" |
19 #include "content/public/browser/browser_message_filter.h" | 20 #include "content/public/browser/browser_message_filter.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
22 #include "net/base/ip_address.h" | 23 #include "net/base/ip_address.h" |
23 #include "net/base/ip_endpoint.h" | 24 #include "net/base/ip_endpoint.h" |
24 #include "net/base/network_change_notifier.h" | 25 #include "net/base/network_change_notifier.h" |
25 | 26 |
26 namespace net { | 27 namespace net { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 std::set<std::unique_ptr<DnsRequest>> dns_requests_; | 120 std::set<std::unique_ptr<DnsRequest>> dns_requests_; |
120 P2PMessageThrottler throttler_; | 121 P2PMessageThrottler throttler_; |
121 | 122 |
122 net::IPAddress default_ipv4_local_address_; | 123 net::IPAddress default_ipv4_local_address_; |
123 net::IPAddress default_ipv6_local_address_; | 124 net::IPAddress default_ipv6_local_address_; |
124 | 125 |
125 bool dump_incoming_rtp_packet_; | 126 bool dump_incoming_rtp_packet_; |
126 bool dump_outgoing_rtp_packet_; | 127 bool dump_outgoing_rtp_packet_; |
127 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; | 128 RenderProcessHost::WebRtcRtpPacketCallback packet_callback_; |
128 | 129 |
130 // Used to call DoGetNetworkList, which may briefly block since getting the | |
131 // default local address involves creating a dummy socket. | |
132 const scoped_refptr<base::SequencedTaskRunner> network_list_task_runner_ = | |
133 base::CreateSequencedTaskRunnerWithTraits( | |
Sergey Ulanov
2017/06/28 17:40:07
It's better to put this initialization in the cons
Taylor_Brandstetter
2017/06/29 11:58:07
Done; that's what I would have done originally, bu
| |
134 {base::MayBlock(), base::TaskPriority::USER_VISIBLE}); | |
135 | |
129 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); | 136 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost); |
130 }; | 137 }; |
131 | 138 |
132 } // namespace content | 139 } // namespace content |
133 | 140 |
134 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ | 141 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_ |
OLD | NEW |