Chromium Code Reviews| 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 #include "content/renderer/media/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 17 #include "base/metrics/sparse_histogram.h" | 16 #include "base/metrics/sparse_histogram.h" |
| 18 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
| 21 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
| 22 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
| 23 #include "content/renderer/media/media_stream_track.h" | 22 #include "content/renderer/media/media_stream_track.h" |
| 24 #include "content/renderer/media/peer_connection_tracker.h" | 23 #include "content/renderer/media/peer_connection_tracker.h" |
| 25 #include "content/renderer/media/remote_media_stream_impl.h" | 24 #include "content/renderer/media/remote_media_stream_impl.h" |
| 25 #include "content/renderer/media/rtc_certificate.h" | |
| 26 #include "content/renderer/media/rtc_data_channel_handler.h" | 26 #include "content/renderer/media/rtc_data_channel_handler.h" |
| 27 #include "content/renderer/media/rtc_dtmf_sender_handler.h" | 27 #include "content/renderer/media/rtc_dtmf_sender_handler.h" |
| 28 #include "content/renderer/media/rtc_media_constraints.h" | 28 #include "content/renderer/media/rtc_media_constraints.h" |
| 29 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" | 29 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
| 30 #include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h" | 30 #include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h" |
| 31 #include "content/renderer/media/webrtc_audio_capturer.h" | 31 #include "content/renderer/media/webrtc_audio_capturer.h" |
| 32 #include "content/renderer/media/webrtc_audio_device_impl.h" | 32 #include "content/renderer/media/webrtc_audio_device_impl.h" |
| 33 #include "content/renderer/media/webrtc_uma_histograms.h" | 33 #include "content/renderer/media/webrtc_uma_histograms.h" |
| 34 #include "content/renderer/render_thread_impl.h" | 34 #include "content/renderer/render_thread_impl.h" |
| 35 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 35 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 webrtc_config->rtcp_mux_policy = | 249 webrtc_config->rtcp_mux_policy = |
| 250 webrtc::PeerConnectionInterface::kRtcpMuxPolicyNegotiate; | 250 webrtc::PeerConnectionInterface::kRtcpMuxPolicyNegotiate; |
| 251 break; | 251 break; |
| 252 case blink::WebRTCRtcpMuxPolicyRequire: | 252 case blink::WebRTCRtcpMuxPolicyRequire: |
| 253 webrtc_config->rtcp_mux_policy = | 253 webrtc_config->rtcp_mux_policy = |
| 254 webrtc::PeerConnectionInterface::kRtcpMuxPolicyRequire; | 254 webrtc::PeerConnectionInterface::kRtcpMuxPolicyRequire; |
| 255 break; | 255 break; |
| 256 default: | 256 default: |
| 257 NOTREACHED(); | 257 NOTREACHED(); |
| 258 } | 258 } |
| 259 | |
| 260 for (size_t i = 0; i < blink_config.numberOfCertificates(); ++i) { | |
|
jochen (gone - plz use gerrit)
2015/10/20 12:27:35
use a range for loop
hbos_chromium
2015/10/20 15:42:23
The certificates of WebRTCConfiguration is not a c
| |
| 261 webrtc_config->certificates.push_back( | |
| 262 blink_config.certificate(i)->rtcCertificate()); | |
| 263 } | |
| 259 } | 264 } |
| 260 | 265 |
| 261 class SessionDescriptionRequestTracker { | 266 class SessionDescriptionRequestTracker { |
| 262 public: | 267 public: |
| 263 SessionDescriptionRequestTracker( | 268 SessionDescriptionRequestTracker( |
| 264 const base::WeakPtr<RTCPeerConnectionHandler>& handler, | 269 const base::WeakPtr<RTCPeerConnectionHandler>& handler, |
| 265 const base::WeakPtr<PeerConnectionTracker>& tracker, | 270 const base::WeakPtr<PeerConnectionTracker>& tracker, |
| 266 PeerConnectionTracker::Action action) | 271 PeerConnectionTracker::Action action) |
| 267 : handler_(handler), tracker_(tracker), action_(action) {} | 272 : handler_(handler), tracker_(tracker), action_(action) {} |
| 268 | 273 |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1664 } | 1669 } |
| 1665 | 1670 |
| 1666 void RTCPeerConnectionHandler::ResetUMAStats() { | 1671 void RTCPeerConnectionHandler::ResetUMAStats() { |
| 1667 DCHECK(thread_checker_.CalledOnValidThread()); | 1672 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1668 num_local_candidates_ipv6_ = 0; | 1673 num_local_candidates_ipv6_ = 0; |
| 1669 num_local_candidates_ipv4_ = 0; | 1674 num_local_candidates_ipv4_ = 0; |
| 1670 ice_connection_checking_start_ = base::TimeTicks(); | 1675 ice_connection_checking_start_ = base::TimeTicks(); |
| 1671 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 1676 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
| 1672 } | 1677 } |
| 1673 } // namespace content | 1678 } // namespace content |
| OLD | NEW |