| 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_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 MediaStreamTrackMetrics track_metrics_; | 256 MediaStreamTrackMetrics track_metrics_; |
| 257 | 257 |
| 258 // Counter for a UMA stat reported at destruction time. | 258 // Counter for a UMA stat reported at destruction time. |
| 259 int num_data_channels_created_ = 0; | 259 int num_data_channels_created_ = 0; |
| 260 | 260 |
| 261 // Counter for number of IPv4 and IPv6 local candidates. | 261 // Counter for number of IPv4 and IPv6 local candidates. |
| 262 int num_local_candidates_ipv4_ = 0; | 262 int num_local_candidates_ipv4_ = 0; |
| 263 int num_local_candidates_ipv6_ = 0; | 263 int num_local_candidates_ipv6_ = 0; |
| 264 | 264 |
| 265 // To make sure the observer is released after the native_peer_connection_, | 265 // To make sure the observers are released after native_peer_connection_, |
| 266 // it has to come first. | 266 // they have to come first. |
| 267 scoped_refptr<Observer> peer_connection_observer_; | 267 scoped_refptr<Observer> peer_connection_observer_; |
| 268 scoped_refptr<webrtc::UMAObserver> uma_observer_; |
| 268 | 269 |
| 269 // |native_peer_connection_| is the libjingle native PeerConnection object. | 270 // |native_peer_connection_| is the libjingle native PeerConnection object. |
| 270 scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection_; | 271 scoped_refptr<webrtc::PeerConnectionInterface> native_peer_connection_; |
| 271 | 272 |
| 272 // The last applied configuration. Used so that the constraints | 273 // The last applied configuration. Used so that the constraints |
| 273 // used when constructing the PeerConnection carry over when | 274 // used when constructing the PeerConnection carry over when |
| 274 // SetConfiguration is called. | 275 // SetConfiguration is called. |
| 275 webrtc::PeerConnectionInterface::RTCConfiguration configuration_; | 276 webrtc::PeerConnectionInterface::RTCConfiguration configuration_; |
| 276 | 277 |
| 277 // Record info about the first SessionDescription from the local and | 278 // Record info about the first SessionDescription from the local and |
| 278 // remote side to record UMA stats once both are set. We only check | 279 // remote side to record UMA stats once both are set. We only check |
| 279 // for the first offer or answer. "pranswer"s and "unknown"s (from | 280 // for the first offer or answer. "pranswer"s and "unknown"s (from |
| 280 // unit tests) are ignored. | 281 // unit tests) are ignored. |
| 281 std::unique_ptr<FirstSessionDescription> first_local_description_; | 282 std::unique_ptr<FirstSessionDescription> first_local_description_; |
| 282 std::unique_ptr<FirstSessionDescription> first_remote_description_; | 283 std::unique_ptr<FirstSessionDescription> first_remote_description_; |
| 283 | 284 |
| 284 std::map<webrtc::MediaStreamInterface*, | 285 std::map<webrtc::MediaStreamInterface*, |
| 285 std::unique_ptr<content::RemoteMediaStreamImpl>> | 286 std::unique_ptr<content::RemoteMediaStreamImpl>> |
| 286 remote_streams_; | 287 remote_streams_; |
| 287 scoped_refptr<webrtc::UMAObserver> uma_observer_; | |
| 288 base::TimeTicks ice_connection_checking_start_; | 288 base::TimeTicks ice_connection_checking_start_; |
| 289 | 289 |
| 290 // Track which ICE Connection state that this PeerConnection has gone through. | 290 // Track which ICE Connection state that this PeerConnection has gone through. |
| 291 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; | 291 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; |
| 292 | 292 |
| 293 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; | 293 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; |
| 294 | 294 |
| 295 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); | 295 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 } // namespace content | 298 } // namespace content |
| 299 | 299 |
| 300 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 300 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
| OLD | NEW |