Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: talk/app/webrtc/webrtcsession.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trying to get iOS to compile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/webrtcsession.h
diff --git a/talk/app/webrtc/webrtcsession.h b/talk/app/webrtc/webrtcsession.h
index 47b49b661a28f39b25fdbcfa0ad86b141d4280a5..e71b80e7801491e5ac3c22dae3d16aeeb3ef5cf5 100644
--- a/talk/app/webrtc/webrtcsession.h
+++ b/talk/app/webrtc/webrtcsession.h
@@ -31,6 +31,7 @@
#include <string>
#include "talk/app/webrtc/datachannel.h"
+#include "talk/app/webrtc/dtlscertificate.h"
#include "talk/app/webrtc/dtmfsender.h"
#include "talk/app/webrtc/mediastreamprovider.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
@@ -123,11 +124,17 @@ class WebRtcSession : public cricket::BaseSession,
MediaStreamSignaling* mediastream_signaling);
virtual ~WebRtcSession();
+ // This method takes the ownership of |dtls_identity_service|.
bool Initialize(
const PeerConnectionFactoryInterface::Options& options,
const MediaConstraintsInterface* constraints,
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
const PeerConnectionInterface::RTCConfiguration& rtc_configuration);
+ bool Initialize(
+ const PeerConnectionFactoryInterface::Options& options,
+ const MediaConstraintsInterface* constraints,
+ const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate,
+ const PeerConnectionInterface::RTCConfiguration& rtc_configuration);
// Deletes the voice, video and data channel and changes the session state
// to STATE_RECEIVEDTERMINATE.
void Terminate();
@@ -246,13 +253,15 @@ class WebRtcSession : public cricket::BaseSession,
void ResetIceRestartLatch();
- // Called when an SSLIdentity is generated or retrieved by
+ // Called when a DtlsCertificate is generated or retrieved by
// WebRTCSessionDescriptionFactory. Should happen before setLocalDescription.
- void OnIdentityReady(rtc::SSLIdentity* identity);
+ void OnCertificateReady(
+ const rtc::scoped_refptr<DtlsCertificate>& certificate);
void OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp);
// For unit test.
- bool waiting_for_identity() const;
+ bool waiting_for_certificate() const;
+ rtc::scoped_refptr<DtlsCertificate> get_certificate() const;
void set_metrics_observer(
webrtc::MetricsObserverInterface* metrics_observer) {
@@ -268,6 +277,13 @@ class WebRtcSession : public cricket::BaseSession,
kAnswer,
};
+ bool InitializeCommon(
Henrik Grunell WebRTC 2015/08/12 14:46:30 Same here as other files, improve naming.
hbos 2015/08/14 14:09:39 Done.
+ const PeerConnectionFactoryInterface::Options& options,
+ const MediaConstraintsInterface* constraints,
+ const PeerConnectionInterface::RTCConfiguration& rtc_configuration);
+ void InitializeFactoryAfterConstruction(
+ const PeerConnectionFactoryInterface::Options& options);
+
// Invokes ConnectChannels() on transport proxies, which initiates ice
// candidates allocation.
bool StartCandidatesAllocation();
@@ -393,6 +409,7 @@ class WebRtcSession : public cricket::BaseSession,
// 3. If both 1&2 are false, data channel is not allowed (DCT_NONE).
cricket::DataChannelType data_channel_type_;
rtc::scoped_ptr<IceRestartAnswerLatch> ice_restart_latch_;
+ rtc::scoped_refptr<DtlsCertificate> certificate_;
rtc::scoped_ptr<WebRtcSessionDescriptionFactory>
webrtc_session_desc_factory_;

Powered by Google App Engine
This is Rietveld 408576698