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