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

Unified Diff: talk/app/webrtc/peerconnection.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: Cleanup 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/peerconnection.h
diff --git a/talk/app/webrtc/peerconnection.h b/talk/app/webrtc/peerconnection.h
index 016259661615ad8721fc7a9fb4aeb672588ecd56..681817e57d9c6e2d1842c5f58673b96239fbad1d 100644
--- a/talk/app/webrtc/peerconnection.h
+++ b/talk/app/webrtc/peerconnection.h
@@ -57,12 +57,19 @@ class PeerConnection : public PeerConnectionInterface,
public:
explicit PeerConnection(PeerConnectionFactory* factory);
+ // This method takes the ownership of |dtls_identity_service|.
bool Initialize(
- const PeerConnectionInterface::RTCConfiguration& configuration,
- const MediaConstraintsInterface* constraints,
- PortAllocatorFactoryInterface* allocator_factory,
- DTLSIdentityServiceInterface* dtls_identity_service,
- PeerConnectionObserver* observer);
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ const MediaConstraintsInterface* constraints,
+ PortAllocatorFactoryInterface* allocator_factory,
+ DTLSIdentityServiceInterface* dtls_identity_service,
+ PeerConnectionObserver* observer);
+ bool Initialize(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ const MediaConstraintsInterface* constraints,
+ PortAllocatorFactoryInterface* allocator_factory,
+ rtc::scoped_refptr<DtlsCertificate> certificate,
+ PeerConnectionObserver* observer);
virtual rtc::scoped_refptr<StreamCollectionInterface> local_streams();
virtual rtc::scoped_refptr<StreamCollectionInterface> remote_streams();
virtual bool AddStream(MediaStreamInterface* local_stream);
@@ -115,6 +122,13 @@ class PeerConnection : public PeerConnectionInterface,
virtual ~PeerConnection();
private:
+ bool InitializeCommon(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ const MediaConstraintsInterface* constraints,
+ PortAllocatorFactoryInterface* allocator_factory,
+ PeerConnectionObserver* observer);
+ void InitializeSessionAfterInit();
+
// Implements MessageHandler.
virtual void OnMessage(rtc::Message* msg);
@@ -157,14 +171,6 @@ class PeerConnection : public PeerConnectionInterface,
cricket::BaseSession::State state);
void ChangeSignalingState(SignalingState signaling_state);
- bool DoInitialize(IceTransportsType type,
- const StunConfigurations& stun_config,
- const TurnConfigurations& turn_config,
- const MediaConstraintsInterface* constraints,
- PortAllocatorFactoryInterface* allocator_factory,
- DTLSIdentityServiceInterface* dtls_identity_service,
- PeerConnectionObserver* observer);
-
rtc::Thread* signaling_thread() const {
return factory_->signaling_thread();
}

Powered by Google App Engine
This is Rietveld 408576698