| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 // Initialize method only used for unit test. | 102 // Initialize method only used for unit test. |
| 103 bool InitializeForTest( | 103 bool InitializeForTest( |
| 104 const blink::WebRTCConfiguration& server_configuration, | 104 const blink::WebRTCConfiguration& server_configuration, |
| 105 const blink::WebMediaConstraints& options, | 105 const blink::WebMediaConstraints& options, |
| 106 PeerConnectionTracker* peer_connection_tracker); | 106 PeerConnectionTracker* peer_connection_tracker); |
| 107 | 107 |
| 108 // blink::WebRTCPeerConnectionHandler implementation | 108 // blink::WebRTCPeerConnectionHandler implementation |
| 109 virtual bool initialize( | 109 virtual bool initialize( |
| 110 const blink::WebRTCConfiguration& server_configuration, | 110 const blink::WebRTCConfiguration& server_configuration, |
| 111 const blink::WebMediaConstraints& options) OVERRIDE; | 111 const blink::WebMediaConstraints& options) override; |
| 112 | 112 |
| 113 virtual void createOffer( | 113 virtual void createOffer( |
| 114 const blink::WebRTCSessionDescriptionRequest& request, | 114 const blink::WebRTCSessionDescriptionRequest& request, |
| 115 const blink::WebMediaConstraints& options) OVERRIDE; | 115 const blink::WebMediaConstraints& options) override; |
| 116 virtual void createOffer( | 116 virtual void createOffer( |
| 117 const blink::WebRTCSessionDescriptionRequest& request, | 117 const blink::WebRTCSessionDescriptionRequest& request, |
| 118 const blink::WebRTCOfferOptions& options) OVERRIDE; | 118 const blink::WebRTCOfferOptions& options) override; |
| 119 | 119 |
| 120 virtual void createAnswer( | 120 virtual void createAnswer( |
| 121 const blink::WebRTCSessionDescriptionRequest& request, | 121 const blink::WebRTCSessionDescriptionRequest& request, |
| 122 const blink::WebMediaConstraints& options) OVERRIDE; | 122 const blink::WebMediaConstraints& options) override; |
| 123 | 123 |
| 124 virtual void setLocalDescription( | 124 virtual void setLocalDescription( |
| 125 const blink::WebRTCVoidRequest& request, | 125 const blink::WebRTCVoidRequest& request, |
| 126 const blink::WebRTCSessionDescription& description) OVERRIDE; | 126 const blink::WebRTCSessionDescription& description) override; |
| 127 virtual void setRemoteDescription( | 127 virtual void setRemoteDescription( |
| 128 const blink::WebRTCVoidRequest& request, | 128 const blink::WebRTCVoidRequest& request, |
| 129 const blink::WebRTCSessionDescription& description) OVERRIDE; | 129 const blink::WebRTCSessionDescription& description) override; |
| 130 | 130 |
| 131 virtual blink::WebRTCSessionDescription localDescription() | 131 virtual blink::WebRTCSessionDescription localDescription() |
| 132 OVERRIDE; | 132 override; |
| 133 virtual blink::WebRTCSessionDescription remoteDescription() | 133 virtual blink::WebRTCSessionDescription remoteDescription() |
| 134 OVERRIDE; | 134 override; |
| 135 | 135 |
| 136 virtual bool updateICE( | 136 virtual bool updateICE( |
| 137 const blink::WebRTCConfiguration& server_configuration, | 137 const blink::WebRTCConfiguration& server_configuration, |
| 138 const blink::WebMediaConstraints& options) OVERRIDE; | 138 const blink::WebMediaConstraints& options) override; |
| 139 virtual bool addICECandidate( | 139 virtual bool addICECandidate( |
| 140 const blink::WebRTCICECandidate& candidate) OVERRIDE; | 140 const blink::WebRTCICECandidate& candidate) override; |
| 141 virtual bool addICECandidate( | 141 virtual bool addICECandidate( |
| 142 const blink::WebRTCVoidRequest& request, | 142 const blink::WebRTCVoidRequest& request, |
| 143 const blink::WebRTCICECandidate& candidate) OVERRIDE; | 143 const blink::WebRTCICECandidate& candidate) override; |
| 144 virtual void OnaddICECandidateResult(const blink::WebRTCVoidRequest& request, | 144 virtual void OnaddICECandidateResult(const blink::WebRTCVoidRequest& request, |
| 145 bool result); | 145 bool result); |
| 146 | 146 |
| 147 virtual bool addStream( | 147 virtual bool addStream( |
| 148 const blink::WebMediaStream& stream, | 148 const blink::WebMediaStream& stream, |
| 149 const blink::WebMediaConstraints& options) OVERRIDE; | 149 const blink::WebMediaConstraints& options) override; |
| 150 virtual void removeStream( | 150 virtual void removeStream( |
| 151 const blink::WebMediaStream& stream) OVERRIDE; | 151 const blink::WebMediaStream& stream) override; |
| 152 virtual void getStats( | 152 virtual void getStats( |
| 153 const blink::WebRTCStatsRequest& request) OVERRIDE; | 153 const blink::WebRTCStatsRequest& request) override; |
| 154 virtual blink::WebRTCDataChannelHandler* createDataChannel( | 154 virtual blink::WebRTCDataChannelHandler* createDataChannel( |
| 155 const blink::WebString& label, | 155 const blink::WebString& label, |
| 156 const blink::WebRTCDataChannelInit& init) OVERRIDE; | 156 const blink::WebRTCDataChannelInit& init) override; |
| 157 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( | 157 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( |
| 158 const blink::WebMediaStreamTrack& track) OVERRIDE; | 158 const blink::WebMediaStreamTrack& track) override; |
| 159 virtual void stop() OVERRIDE; | 159 virtual void stop() override; |
| 160 | 160 |
| 161 // webrtc::PeerConnectionObserver implementation | 161 // webrtc::PeerConnectionObserver implementation |
| 162 virtual void OnError() OVERRIDE; | 162 virtual void OnError() override; |
| 163 // Triggered when the SignalingState changed. | 163 // Triggered when the SignalingState changed. |
| 164 virtual void OnSignalingChange( | 164 virtual void OnSignalingChange( |
| 165 webrtc::PeerConnectionInterface::SignalingState new_state) OVERRIDE; | 165 webrtc::PeerConnectionInterface::SignalingState new_state) override; |
| 166 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) OVERRIDE; | 166 virtual void OnAddStream(webrtc::MediaStreamInterface* stream) override; |
| 167 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) OVERRIDE; | 167 virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) override; |
| 168 virtual void OnIceCandidate( | 168 virtual void OnIceCandidate( |
| 169 const webrtc::IceCandidateInterface* candidate) OVERRIDE; | 169 const webrtc::IceCandidateInterface* candidate) override; |
| 170 virtual void OnIceConnectionChange( | 170 virtual void OnIceConnectionChange( |
| 171 webrtc::PeerConnectionInterface::IceConnectionState new_state) OVERRIDE; | 171 webrtc::PeerConnectionInterface::IceConnectionState new_state) override; |
| 172 virtual void OnIceGatheringChange( | 172 virtual void OnIceGatheringChange( |
| 173 webrtc::PeerConnectionInterface::IceGatheringState new_state) OVERRIDE; | 173 webrtc::PeerConnectionInterface::IceGatheringState new_state) override; |
| 174 | 174 |
| 175 virtual void OnDataChannel( | 175 virtual void OnDataChannel( |
| 176 webrtc::DataChannelInterface* data_channel) OVERRIDE; | 176 webrtc::DataChannelInterface* data_channel) override; |
| 177 virtual void OnRenegotiationNeeded() OVERRIDE; | 177 virtual void OnRenegotiationNeeded() override; |
| 178 | 178 |
| 179 // Delegate functions to allow for mocking of WebKit interfaces. | 179 // Delegate functions to allow for mocking of WebKit interfaces. |
| 180 // getStats takes ownership of request parameter. | 180 // getStats takes ownership of request parameter. |
| 181 virtual void getStats(LocalRTCStatsRequest* request); | 181 virtual void getStats(LocalRTCStatsRequest* request); |
| 182 | 182 |
| 183 // Calls GetStats on |native_peer_connection_|. | 183 // Calls GetStats on |native_peer_connection_|. |
| 184 void GetStats(webrtc::StatsObserver* observer, | 184 void GetStats(webrtc::StatsObserver* observer, |
| 185 webrtc::MediaStreamTrackInterface* track, | 185 webrtc::MediaStreamTrackInterface* track, |
| 186 webrtc::PeerConnectionInterface::StatsOutputLevel level); | 186 webrtc::PeerConnectionInterface::StatsOutputLevel level); |
| 187 | 187 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 RemoteStreamMap remote_streams_; | 230 RemoteStreamMap remote_streams_; |
| 231 scoped_refptr<webrtc::UMAObserver> uma_observer_; | 231 scoped_refptr<webrtc::UMAObserver> uma_observer_; |
| 232 base::TimeTicks ice_connection_checking_start_; | 232 base::TimeTicks ice_connection_checking_start_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); | 234 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace content | 237 } // namespace content |
| 238 | 238 |
| 239 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ | 239 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ |
| OLD | NEW |