| Index: talk/app/webrtc/webrtcsession.h
|
| diff --git a/talk/app/webrtc/webrtcsession.h b/talk/app/webrtc/webrtcsession.h
|
| index 30ebc1e49ee8dcc07e015e20f784f87d84af725e..ebdaf0a01a70b953d6a80c786085c1a898542202 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"
|
| @@ -122,11 +123,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,
|
| DTLSIdentityServiceInterface* dtls_identity_service,
|
| const PeerConnectionInterface::RTCConfiguration& rtc_configuration);
|
| + bool Initialize(
|
| + const PeerConnectionFactoryInterface::Options& options,
|
| + const MediaConstraintsInterface* constraints,
|
| + 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();
|
| @@ -245,13 +252,14 @@ 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(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) {
|
| @@ -267,6 +275,13 @@ class WebRtcSession : public cricket::BaseSession,
|
| kAnswer,
|
| };
|
|
|
| + bool InitializeCommon(
|
| + 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();
|
| @@ -392,6 +407,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_;
|
|
|