Reland of Adding PeerConnectionInterface::SetConfiguration method. (patchset #1 id:1 of https://codereview.webrtc.org/1361263002/ )
Reason for revert:
Relanding with SetConfiguration not pure virtual.
Original issue's description:
> Revert of Adding PeerConnectionInterface::SetConfiguration method. (patchset #4 id:60001 of https://codereview.webrtc.org/1317353005/ )
>
> Reason for revert:
> Broke FYI bots because SetConfiguration is pure virtual and MockPeerConnectionImpl doesn't implement it. Need to reland with SetConfiguration not pure virtual.
>
> Original issue's description:
> > Adding PeerConnectionInterface::SetConfiguration method.
> >
> > Also updated the JNI and Objective-C bindings. Later, will have a CL to
> > remove UpdateIce, which this method effectively replaces.
> >
> > BUG=webrtc:4945
> >
> > Committed: https://crrev.com/70702afbcb8418fe93747e7ed63bcbf5e56b90e9
> > Cr-Commit-Position: refs/heads/master@{#10040}
>
> TBR=guoweis@webrtc.org,pthatcher@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4945
>
> Committed: https://crrev.com/7603c76ab077b1e2033bb179595129bd96797345
> Cr-Commit-Position: refs/heads/master@{#10041}
TBR=guoweis@webrtc.org,pthatcher@webrtc.org,tkchin@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4945
Review URL: https://codereview.webrtc.org/1361273002
Cr-Commit-Position: refs/heads/master@{#10112}
diff --git a/talk/app/webrtc/peerconnection.h b/talk/app/webrtc/peerconnection.h
index 8caa821..e996132 100644
--- a/talk/app/webrtc/peerconnection.h
+++ b/talk/app/webrtc/peerconnection.h
@@ -65,64 +65,61 @@
PortAllocatorFactoryInterface* allocator_factory,
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
PeerConnectionObserver* observer);
- virtual rtc::scoped_refptr<StreamCollectionInterface> local_streams();
- virtual rtc::scoped_refptr<StreamCollectionInterface> remote_streams();
- virtual bool AddStream(MediaStreamInterface* local_stream);
- virtual void RemoveStream(MediaStreamInterface* local_stream);
+ rtc::scoped_refptr<StreamCollectionInterface> local_streams() override;
+ rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override;
+ bool AddStream(MediaStreamInterface* local_stream) override;
+ void RemoveStream(MediaStreamInterface* local_stream) override;
- virtual rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
- AudioTrackInterface* track);
+ rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
+ AudioTrackInterface* track) override;
std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders()
const override;
std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers()
const override;
- virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
+ rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
const std::string& label,
- const DataChannelInit* config);
- virtual bool GetStats(StatsObserver* observer,
- webrtc::MediaStreamTrackInterface* track,
- StatsOutputLevel level);
+ const DataChannelInit* config) override;
+ bool GetStats(StatsObserver* observer,
+ webrtc::MediaStreamTrackInterface* track,
+ StatsOutputLevel level) override;
- virtual SignalingState signaling_state();
+ SignalingState signaling_state() override;
// TODO(bemasc): Remove ice_state() when callers are removed.
- virtual IceState ice_state();
- virtual IceConnectionState ice_connection_state();
- virtual IceGatheringState ice_gathering_state();
+ IceState ice_state() override;
+ IceConnectionState ice_connection_state() override;
+ IceGatheringState ice_gathering_state() override;
- virtual const SessionDescriptionInterface* local_description() const;
- virtual const SessionDescriptionInterface* remote_description() const;
+ const SessionDescriptionInterface* local_description() const override;
+ const SessionDescriptionInterface* remote_description() const override;
// JSEP01
- virtual void CreateOffer(CreateSessionDescriptionObserver* observer,
- const MediaConstraintsInterface* constraints);
- virtual void CreateOffer(CreateSessionDescriptionObserver* observer,
- const RTCOfferAnswerOptions& options);
- virtual void CreateAnswer(CreateSessionDescriptionObserver* observer,
- const MediaConstraintsInterface* constraints);
- virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
- SessionDescriptionInterface* desc);
- virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
- SessionDescriptionInterface* desc);
- // TODO(mallinath) : Deprecated version, remove after all clients are updated.
- virtual bool UpdateIce(const IceServers& configuration,
- const MediaConstraintsInterface* constraints);
- virtual bool UpdateIce(
- const PeerConnectionInterface::RTCConfiguration& config);
- virtual bool AddIceCandidate(const IceCandidateInterface* candidate);
+ void CreateOffer(CreateSessionDescriptionObserver* observer,
+ const MediaConstraintsInterface* constraints) override;
+ void CreateOffer(CreateSessionDescriptionObserver* observer,
+ const RTCOfferAnswerOptions& options) override;
+ void CreateAnswer(CreateSessionDescriptionObserver* observer,
+ const MediaConstraintsInterface* constraints) override;
+ void SetLocalDescription(SetSessionDescriptionObserver* observer,
+ SessionDescriptionInterface* desc) override;
+ void SetRemoteDescription(SetSessionDescriptionObserver* observer,
+ SessionDescriptionInterface* desc) override;
+ bool SetConfiguration(
+ const PeerConnectionInterface::RTCConfiguration& config) override;
+ bool AddIceCandidate(const IceCandidateInterface* candidate) override;
- virtual void RegisterUMAObserver(UMAObserver* observer);
+ void RegisterUMAObserver(UMAObserver* observer) override;
- virtual void Close();
+ void Close() override;
protected:
- virtual ~PeerConnection();
+ ~PeerConnection() override;
private:
// Implements MessageHandler.
- virtual void OnMessage(rtc::Message* msg);
+ void OnMessage(rtc::Message* msg) override;
// Implements MediaStreamSignalingObserver.
void OnAddRemoteStream(MediaStreamInterface* stream) override;