| 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> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
| 19 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
| 20 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
| 21 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
| 22 #include "content/renderer/media/webrtc/media_stream_track_metrics.h" | 22 #include "content/renderer/media/webrtc/media_stream_track_metrics.h" |
| 23 #include "ipc/ipc_platform_file.h" |
| 23 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 24 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
| 24 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" | 25 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" |
| 25 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" | 26 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" |
| 26 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" | 27 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" |
| 27 | 28 |
| 28 namespace blink { | 29 namespace blink { |
| 29 class WebFrame; | 30 class WebFrame; |
| 30 class WebRTCAnswerOptions; | 31 class WebRTCAnswerOptions; |
| 31 class WebRTCDataChannelHandler; | 32 class WebRTCDataChannelHandler; |
| 32 class WebRTCOfferOptions; | 33 class WebRTCOfferOptions; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // Asynchronously calls native_peer_connection_->getStats on the signaling | 162 // Asynchronously calls native_peer_connection_->getStats on the signaling |
| 162 // thread. If the |track_id| is empty, the |track_type| parameter is ignored. | 163 // thread. If the |track_id| is empty, the |track_type| parameter is ignored. |
| 163 void GetStats(webrtc::StatsObserver* observer, | 164 void GetStats(webrtc::StatsObserver* observer, |
| 164 webrtc::PeerConnectionInterface::StatsOutputLevel level, | 165 webrtc::PeerConnectionInterface::StatsOutputLevel level, |
| 165 const std::string& track_id, | 166 const std::string& track_id, |
| 166 blink::WebMediaStreamSource::Type track_type); | 167 blink::WebMediaStreamSource::Type track_type); |
| 167 | 168 |
| 168 // Tells the |client_| to close RTCPeerConnection. | 169 // Tells the |client_| to close RTCPeerConnection. |
| 169 void CloseClientPeerConnection(); | 170 void CloseClientPeerConnection(); |
| 170 | 171 |
| 172 // Start recording an event log. |
| 173 void StartEventLog(IPC::PlatformFileForTransit file, |
| 174 int64_t max_file_size_bytes); |
| 175 // Stop recording an event log. |
| 176 void StopEventLog(); |
| 177 |
| 171 protected: | 178 protected: |
| 172 webrtc::PeerConnectionInterface* native_peer_connection() { | 179 webrtc::PeerConnectionInterface* native_peer_connection() { |
| 173 return native_peer_connection_.get(); | 180 return native_peer_connection_.get(); |
| 174 } | 181 } |
| 175 | 182 |
| 176 class Observer; | 183 class Observer; |
| 177 friend class Observer; | 184 friend class Observer; |
| 178 | 185 |
| 179 void OnSignalingChange( | 186 void OnSignalingChange( |
| 180 webrtc::PeerConnectionInterface::SignalingState new_state); | 187 webrtc::PeerConnectionInterface::SignalingState new_state); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; | 287 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; |
| 281 | 288 |
| 282 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; | 289 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; |
| 283 | 290 |
| 284 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); | 291 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); |
| 285 }; | 292 }; |
| 286 | 293 |
| 287 } // namespace content | 294 } // namespace content |
| 288 | 295 |
| 289 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 296 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
| OLD | NEW |