OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 }; | 57 }; |
58 | 58 |
59 struct CreateSessionDescriptionMsg : public rtc::MessageData { | 59 struct CreateSessionDescriptionMsg : public rtc::MessageData { |
60 explicit CreateSessionDescriptionMsg( | 60 explicit CreateSessionDescriptionMsg( |
61 webrtc::CreateSessionDescriptionObserver* observer) | 61 webrtc::CreateSessionDescriptionObserver* observer) |
62 : observer(observer) { | 62 : observer(observer) { |
63 } | 63 } |
64 | 64 |
65 rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer; | 65 rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserver> observer; |
66 std::string error; | 66 std::string error; |
67 rtc::scoped_ptr<webrtc::SessionDescriptionInterface> description; | 67 std::unique_ptr<webrtc::SessionDescriptionInterface> description; |
68 }; | 68 }; |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 void WebRtcIdentityRequestObserver::OnFailure(int error) { | 71 void WebRtcIdentityRequestObserver::OnFailure(int error) { |
72 SignalRequestFailed(error); | 72 SignalRequestFailed(error); |
73 } | 73 } |
74 | 74 |
75 void WebRtcIdentityRequestObserver::OnSuccess( | 75 void WebRtcIdentityRequestObserver::OnSuccess( |
76 const std::string& der_cert, const std::string& der_private_key) { | 76 const std::string& der_cert, const std::string& der_private_key) { |
77 std::string pem_cert = rtc::SSLIdentity::DerToPem( | 77 std::string pem_cert = rtc::SSLIdentity::DerToPem( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 if (!dest_candidates->HasCandidate(new_candidate)) { | 120 if (!dest_candidates->HasCandidate(new_candidate)) { |
121 dest_desc->AddCandidate(source_candidates->at(n)); | 121 dest_desc->AddCandidate(source_candidates->at(n)); |
122 } | 122 } |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 // Private constructor called by other constructors. | 126 // Private constructor called by other constructors. |
127 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( | 127 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( |
128 rtc::Thread* signaling_thread, | 128 rtc::Thread* signaling_thread, |
129 cricket::ChannelManager* channel_manager, | 129 cricket::ChannelManager* channel_manager, |
130 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 130 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
131 const rtc::scoped_refptr<WebRtcIdentityRequestObserver>& | 131 const rtc::scoped_refptr<WebRtcIdentityRequestObserver>& |
132 identity_request_observer, | 132 identity_request_observer, |
133 WebRtcSession* session, | 133 WebRtcSession* session, |
134 const std::string& session_id, | 134 const std::string& session_id, |
135 bool dtls_enabled) | 135 bool dtls_enabled) |
136 : signaling_thread_(signaling_thread), | 136 : signaling_thread_(signaling_thread), |
137 session_desc_factory_(channel_manager, &transport_desc_factory_), | 137 session_desc_factory_(channel_manager, &transport_desc_factory_), |
138 // RFC 4566 suggested a Network Time Protocol (NTP) format timestamp | 138 // RFC 4566 suggested a Network Time Protocol (NTP) format timestamp |
139 // as the session id and session version. To simplify, it should be fine | 139 // as the session id and session version. To simplify, it should be fine |
140 // to just use a random number as session id and start version from | 140 // to just use a random number as session id and start version from |
(...skipping 20 matching lines...) Expand all Loading... |
161 nullptr, | 161 nullptr, |
162 session, | 162 session, |
163 session_id, | 163 session_id, |
164 false) { | 164 false) { |
165 LOG(LS_VERBOSE) << "DTLS-SRTP disabled."; | 165 LOG(LS_VERBOSE) << "DTLS-SRTP disabled."; |
166 } | 166 } |
167 | 167 |
168 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( | 168 WebRtcSessionDescriptionFactory::WebRtcSessionDescriptionFactory( |
169 rtc::Thread* signaling_thread, | 169 rtc::Thread* signaling_thread, |
170 cricket::ChannelManager* channel_manager, | 170 cricket::ChannelManager* channel_manager, |
171 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 171 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
172 WebRtcSession* session, | 172 WebRtcSession* session, |
173 const std::string& session_id) | 173 const std::string& session_id) |
174 : WebRtcSessionDescriptionFactory( | 174 : WebRtcSessionDescriptionFactory( |
175 signaling_thread, | 175 signaling_thread, |
176 channel_manager, | 176 channel_manager, |
177 std::move(dtls_identity_store), | 177 std::move(dtls_identity_store), |
178 new rtc::RefCountedObject<WebRtcIdentityRequestObserver>(), | 178 new rtc::RefCountedObject<WebRtcIdentityRequestObserver>(), |
179 session, | 179 session, |
180 session_id, | 180 session_id, |
181 true) { | 181 true) { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 if (create_session_description_requests_.front().type == | 512 if (create_session_description_requests_.front().type == |
513 CreateSessionDescriptionRequest::kOffer) { | 513 CreateSessionDescriptionRequest::kOffer) { |
514 InternalCreateOffer(create_session_description_requests_.front()); | 514 InternalCreateOffer(create_session_description_requests_.front()); |
515 } else { | 515 } else { |
516 InternalCreateAnswer(create_session_description_requests_.front()); | 516 InternalCreateAnswer(create_session_description_requests_.front()); |
517 } | 517 } |
518 create_session_description_requests_.pop(); | 518 create_session_description_requests_.pop(); |
519 } | 519 } |
520 } | 520 } |
521 } // namespace webrtc | 521 } // namespace webrtc |
OLD | NEW |