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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Asynchronously calls native_peer_connection_->getStats on the signaling | 160 // Asynchronously calls native_peer_connection_->getStats on the signaling |
160 // thread. If the |track_id| is empty, the |track_type| parameter is ignored. | 161 // thread. If the |track_id| is empty, the |track_type| parameter is ignored. |
161 void GetStats(webrtc::StatsObserver* observer, | 162 void GetStats(webrtc::StatsObserver* observer, |
162 webrtc::PeerConnectionInterface::StatsOutputLevel level, | 163 webrtc::PeerConnectionInterface::StatsOutputLevel level, |
163 const std::string& track_id, | 164 const std::string& track_id, |
164 blink::WebMediaStreamSource::Type track_type); | 165 blink::WebMediaStreamSource::Type track_type); |
165 | 166 |
166 // Tells the |client_| to close RTCPeerConnection. | 167 // Tells the |client_| to close RTCPeerConnection. |
167 void CloseClientPeerConnection(); | 168 void CloseClientPeerConnection(); |
168 | 169 |
| 170 // Start recording an event log. |
| 171 void StartEventLog(IPC::PlatformFileForTransit file, |
| 172 int64_t max_file_size_bytes); |
| 173 // Stop recording an event log. |
| 174 void StopEventLog(); |
| 175 |
169 protected: | 176 protected: |
170 webrtc::PeerConnectionInterface* native_peer_connection() { | 177 webrtc::PeerConnectionInterface* native_peer_connection() { |
171 return native_peer_connection_.get(); | 178 return native_peer_connection_.get(); |
172 } | 179 } |
173 | 180 |
174 class Observer; | 181 class Observer; |
175 friend class Observer; | 182 friend class Observer; |
176 | 183 |
177 void OnSignalingChange( | 184 void OnSignalingChange( |
178 webrtc::PeerConnectionInterface::SignalingState new_state); | 185 webrtc::PeerConnectionInterface::SignalingState new_state); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; | 285 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; |
279 | 286 |
280 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; | 287 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; |
281 | 288 |
282 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); | 289 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); |
283 }; | 290 }; |
284 | 291 |
285 } // namespace content | 292 } // namespace content |
286 | 293 |
287 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 294 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
OLD | NEW |