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/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
19 #include "content/renderer/media/media_stream_dependency_factory.h" | |
20 #include "content/renderer/media/media_stream_track.h" | 19 #include "content/renderer/media/media_stream_track.h" |
21 #include "content/renderer/media/peer_connection_tracker.h" | 20 #include "content/renderer/media/peer_connection_tracker.h" |
22 #include "content/renderer/media/remote_media_stream_impl.h" | 21 #include "content/renderer/media/remote_media_stream_impl.h" |
23 #include "content/renderer/media/rtc_data_channel_handler.h" | 22 #include "content/renderer/media/rtc_data_channel_handler.h" |
24 #include "content/renderer/media/rtc_dtmf_sender_handler.h" | 23 #include "content/renderer/media/rtc_dtmf_sender_handler.h" |
25 #include "content/renderer/media/rtc_media_constraints.h" | 24 #include "content/renderer/media/rtc_media_constraints.h" |
| 25 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
26 #include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h" | 26 #include "content/renderer/media/webrtc/webrtc_media_stream_adapter.h" |
27 #include "content/renderer/media/webrtc_audio_capturer.h" | 27 #include "content/renderer/media/webrtc_audio_capturer.h" |
28 #include "content/renderer/media/webrtc_audio_device_impl.h" | 28 #include "content/renderer/media/webrtc_audio_device_impl.h" |
29 #include "content/renderer/media/webrtc_uma_histograms.h" | 29 #include "content/renderer/media/webrtc_uma_histograms.h" |
30 #include "content/renderer/render_thread_impl.h" | 30 #include "content/renderer/render_thread_impl.h" |
31 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 31 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
32 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 32 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
33 #include "third_party/WebKit/public/platform/WebRTCConfiguration.h" | 33 #include "third_party/WebKit/public/platform/WebRTCConfiguration.h" |
34 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" | 34 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" |
35 #include "third_party/WebKit/public/platform/WebRTCICECandidate.h" | 35 #include "third_party/WebKit/public/platform/WebRTCICECandidate.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 void LocalRTCStatsResponse::addStatistic(size_t report, | 313 void LocalRTCStatsResponse::addStatistic(size_t report, |
314 blink::WebString name, | 314 blink::WebString name, |
315 blink::WebString value) { | 315 blink::WebString value) { |
316 impl_.addStatistic(report, name, value); | 316 impl_.addStatistic(report, name, value); |
317 } | 317 } |
318 | 318 |
319 RTCPeerConnectionHandler::RTCPeerConnectionHandler( | 319 RTCPeerConnectionHandler::RTCPeerConnectionHandler( |
320 blink::WebRTCPeerConnectionHandlerClient* client, | 320 blink::WebRTCPeerConnectionHandlerClient* client, |
321 MediaStreamDependencyFactory* dependency_factory) | 321 PeerConnectionDependencyFactory* dependency_factory) |
322 : client_(client), | 322 : client_(client), |
323 dependency_factory_(dependency_factory), | 323 dependency_factory_(dependency_factory), |
324 frame_(NULL), | 324 frame_(NULL), |
325 peer_connection_tracker_(NULL), | 325 peer_connection_tracker_(NULL), |
326 num_data_channels_created_(0) { | 326 num_data_channels_created_(0) { |
327 } | 327 } |
328 | 328 |
329 RTCPeerConnectionHandler::~RTCPeerConnectionHandler() { | 329 RTCPeerConnectionHandler::~RTCPeerConnectionHandler() { |
330 if (peer_connection_tracker_) | 330 if (peer_connection_tracker_) |
331 peer_connection_tracker_->UnregisterPeerConnection(this); | 331 peer_connection_tracker_->UnregisterPeerConnection(this); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 webrtc::SessionDescriptionInterface* native_desc = | 861 webrtc::SessionDescriptionInterface* native_desc = |
862 dependency_factory_->CreateSessionDescription(type, sdp, error); | 862 dependency_factory_->CreateSessionDescription(type, sdp, error); |
863 | 863 |
864 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 864 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
865 << " Type: " << type << " SDP: " << sdp; | 865 << " Type: " << type << " SDP: " << sdp; |
866 | 866 |
867 return native_desc; | 867 return native_desc; |
868 } | 868 } |
869 | 869 |
870 } // namespace content | 870 } // namespace content |
OLD | NEW |