| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_PEER_CONNECTION_TRACKER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ | 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class WebString; | 25 class WebString; |
| 26 class WebRTCSessionDescription; | 26 class WebRTCSessionDescription; |
| 27 class WebUserMediaRequest; | 27 class WebUserMediaRequest; |
| 28 } // namespace blink | 28 } // namespace blink |
| 29 | 29 |
| 30 namespace webrtc { | 30 namespace webrtc { |
| 31 class DataChannelInterface; | 31 class DataChannelInterface; |
| 32 } // namespace webrtc | 32 } // namespace webrtc |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 class RTCMediaConstraints; | |
| 36 class RTCPeerConnectionHandler; | 35 class RTCPeerConnectionHandler; |
| 37 class RenderThread; | 36 class RenderThread; |
| 38 | 37 |
| 39 // This class collects data about each peer connection, | 38 // This class collects data about each peer connection, |
| 40 // sends it to the browser process, and handles messages | 39 // sends it to the browser process, and handles messages |
| 41 // from the browser process. | 40 // from the browser process. |
| 42 class CONTENT_EXPORT PeerConnectionTracker | 41 class CONTENT_EXPORT PeerConnectionTracker |
| 43 : public RenderProcessObserver, | 42 : public RenderProcessObserver, |
| 44 public base::SupportsWeakPtr<PeerConnectionTracker> { | 43 public base::SupportsWeakPtr<PeerConnectionTracker> { |
| 45 public: | 44 public: |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const blink::WebMediaConstraints& constraints); | 95 const blink::WebMediaConstraints& constraints); |
| 97 | 96 |
| 98 // Sends an update when setLocalDescription or setRemoteDescription is called. | 97 // Sends an update when setLocalDescription or setRemoteDescription is called. |
| 99 virtual void TrackSetSessionDescription( | 98 virtual void TrackSetSessionDescription( |
| 100 RTCPeerConnectionHandler* pc_handler, | 99 RTCPeerConnectionHandler* pc_handler, |
| 101 const std::string& sdp, const std::string& type, Source source); | 100 const std::string& sdp, const std::string& type, Source source); |
| 102 | 101 |
| 103 // Sends an update when Ice candidates are updated. | 102 // Sends an update when Ice candidates are updated. |
| 104 virtual void TrackUpdateIce( | 103 virtual void TrackUpdateIce( |
| 105 RTCPeerConnectionHandler* pc_handler, | 104 RTCPeerConnectionHandler* pc_handler, |
| 106 const webrtc::PeerConnectionInterface::RTCConfiguration& config, | 105 const webrtc::PeerConnectionInterface::RTCConfiguration& config); |
| 107 const blink::WebMediaConstraints& options); | |
| 108 | 106 |
| 109 // Sends an update when an Ice candidate is added. | 107 // Sends an update when an Ice candidate is added. |
| 110 virtual void TrackAddIceCandidate( | 108 virtual void TrackAddIceCandidate( |
| 111 RTCPeerConnectionHandler* pc_handler, | 109 RTCPeerConnectionHandler* pc_handler, |
| 112 const blink::WebRTCICECandidate& candidate, | 110 const blink::WebRTCICECandidate& candidate, |
| 113 Source source, | 111 Source source, |
| 114 bool succeeded); | 112 bool succeeded); |
| 115 | 113 |
| 116 // Sends an update when a media stream is added. | 114 // Sends an update when a media stream is added. |
| 117 virtual void TrackAddStream( | 115 virtual void TrackAddStream( |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 int next_local_id_; | 208 int next_local_id_; |
| 211 base::ThreadChecker main_thread_; | 209 base::ThreadChecker main_thread_; |
| 212 RenderThread* send_target_for_test_; | 210 RenderThread* send_target_for_test_; |
| 213 | 211 |
| 214 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); | 212 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); |
| 215 }; | 213 }; |
| 216 | 214 |
| 217 } // namespace content | 215 } // namespace content |
| 218 | 216 |
| 219 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ | 217 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| OLD | NEW |