webrtc/pc
Henrik Boström 316386747a Reland "SetRemoteDescriptionObserverInterface added."
Description for changes from the original CL:

Calling legacy SRD, implemented using
SetRemoteDescriptionObserverAdapter wrapping the old observer, was
meant to have the exact same behavior as the legacy SRD implementation
which invokes the callbacks in a Post.

However, in the CL that landed and got reverted (PS1), the Adapter had
its own message handler, and callbacks would be invoked even if the PC
was destroyed.

In PS2 I've changed the Adapter to use the PeerConnection's message
handler. If the PC is destroyed, the callback will not be invoked.
This gives identical behavior to before this CL, and the legacy
behavior is covered by a new unittest.

I changed the adapter to be an implementation detail of
peerconnection.cc, therefor some stuff was moved, and the only tests
covering this is now in peerconnection_rtp_unittest.cc.

This is a reland of 6c7ec32bd6
Original change's description:
> SetRemoteDescriptionObserverInterface added.
>
> The new observer replaced SetSessionDescriptionObserver for
> SetRemoteDescription. Unlike SetSessionDescriptionObserver,
> SetRemoteDescriptionObserverInterface is invoked synchronously so
> that the you can rely on the state of the PeerConnection to represent
> the result of the SetRemoteDescription call in the callback.
>
> The new observer succeeds or fails with an RTCError.
>
> This deprecates the need for PeerConnectionObserver::OnAdd/RemoveTrack
> and SetSessionDescriptionObserver, with the benefit that all media
> object changes can be processed in a single callback by the application
> in a synchronous callback. This will help Chromium keep objects in-sync
> across layers and threads in a non-racy and straight-forward way, see
> design doc (Proposal 2):
> https://docs.google.com/a/google.com/document/d/1-cDDC82mgU5zrHacfFz720p3xwRtuBkOPSRchh07Ho0/edit?usp=sharing
>
> An adapter for SetSessionDescriptionObserver is added to allow calling
> the old SetRemoteDescription signature and get the old behavior
> (OnSuccess/OnFailure callback in a Post) until third parties switch.
>
> Bug: webrtc:8473
> Change-Id: I3d4eb60da6dd34615f2c9f384aeaf4634e648c99
> Reviewed-on: https://webrtc-review.googlesource.com/17523
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20841}

TBR=pthatcher@webrtc.org

Bug: webrtc:8473
Change-Id: If2b1a1929663b0e77fcc9c2ebeef043e6f73adf5
Reviewed-on: https://webrtc-review.googlesource.com/25640
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20854}
2017-11-23 19:59:48 +00:00
..
test Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
audiomonitor.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
audiomonitor.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
audiotrack.cc Add explicit includes of refcountedobject.h where it is used. 2017-10-06 13:00:14 +00:00
audiotrack.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
BUILD.gn Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
bundlefilter.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
bundlefilter.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
bundlefilter_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
channel.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
channel.h Remove the unused code. 2017-11-16 04:08:03 +00:00
channel_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
channelmanager.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
channelmanager.h Modernize and cleanup ChannelManager 2017-11-07 18:09:45 +00:00
channelmanager_unittest.cc Modernize and cleanup ChannelManager 2017-11-07 18:09:45 +00:00
createpeerconnectionfactory.cc Remove deprecated CreatePeerConnectionFactory() overloads 2017-11-03 10:16:22 +00:00
currentspeakermonitor.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
currentspeakermonitor.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
currentspeakermonitor_unittest.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
datachannel.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
datachannel.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
datachannel_unittest.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
DEPS Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
dtlssrtptransport.cc Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
dtlssrtptransport.h Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
dtlssrtptransport_unittest.cc Remove an unused debug message. 2017-11-21 00:18:12 +00:00
dtmfsender.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
dtmfsender.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
dtmfsender_unittest.cc Clean up dependencies of peerconnection_unittest. 2017-09-15 12:51:00 +00:00
externalhmac.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
externalhmac.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
iceserverparsing.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
iceserverparsing.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
iceserverparsing_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
jsepicecandidate.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
jsepsessiondescription.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
jsepsessiondescription_unittest.cc Reland "Clean up libjingle API dependencies." 2017-10-05 13:51:21 +00:00
localaudiosource.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
localaudiosource.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
localaudiosource_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
mediaconstraintsinterface_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
mediamonitor.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediamonitor.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediasession.cc Use local codec parameters in the answer. 2017-11-22 23:46:34 +00:00
mediasession.h Remove the unused code. 2017-11-16 04:08:03 +00:00
mediasession_unittest.cc Use local codec parameters in the answer. 2017-11-22 23:46:34 +00:00
mediastream.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
mediastream.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediastream_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediastreamobserver.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediastreamobserver.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
mediastreamtrack.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
OWNERS Make hbos@webrtc.org OWNER of peerconnection*. 2017-11-13 12:27:29 +00:00
peerconnection.cc Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
peerconnection.h Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
peerconnection_bundle_unittest.cc Remove deprecated CreatePeerConnectionFactory() overloads 2017-11-03 10:16:22 +00:00
peerconnection_crypto_unittest.cc Rewrite the remaining few WebRtcSession tests. 2017-10-23 21:05:17 +00:00
peerconnection_datachannel_unittest.cc Rewrite WebRtcSession data channel tests as PeerConnection tests 2017-10-23 19:13:47 +00:00
peerconnection_ice_unittest.cc Reland "Rewrite WebRtcSession media tests as PeerConnection tests" 2017-10-21 01:38:14 +00:00
peerconnection_integrationtest.cc Fixing some clang-tidy findings. 2017-11-21 16:43:07 +00:00
peerconnection_media_unittest.cc Reland "Rewrite WebRtcSession media tests as PeerConnection tests" 2017-10-21 01:38:14 +00:00
peerconnection_rtp_unittest.cc Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
peerconnection_signaling_unittest.cc Reland "Rewrite WebRtcSession media tests as PeerConnection tests" 2017-10-21 01:38:14 +00:00
peerconnectionendtoend_unittest.cc Optional: Use nullopt and implicit construction in /pc/peerconnectionendtoend_unittest.cc 2017-11-22 14:21:57 +00:00
peerconnectionfactory.cc Sets names of peerconnection worker and network thread 2017-11-13 10:34:58 +00:00
peerconnectionfactory.h Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
peerconnectionfactory_unittest.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
peerconnectioninterface_unittest.cc Optional: Use nullopt and implicit construction in /pc/peerconnectioninterface_unittest.cc 2017-11-22 11:39:07 +00:00
peerconnectionwrapper.cc Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
peerconnectionwrapper.h Reland "SetRemoteDescriptionObserverInterface added." 2017-11-23 19:59:48 +00:00
proxy_unittest.cc Clean up dependencies of peerconnection_unittest. 2017-09-15 12:51:00 +00:00
remoteaudiosource.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
remoteaudiosource.h Fix flaky memory leak in RemoteAudioSource 2017-10-19 18:01:52 +00:00
rtcpmuxfilter.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
rtcpmuxfilter.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
rtcpmuxfilter_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
rtcstats_integrationtest.cc Add network_type to local RTCIceCandidateStats 2017-11-21 19:58:37 +00:00
rtcstatscollector.cc Add network_type to local RTCIceCandidateStats 2017-11-21 19:58:37 +00:00
rtcstatscollector.h Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
rtcstatscollector_unittest.cc Add network_type to local RTCIceCandidateStats 2017-11-21 19:58:37 +00:00
rtpreceiver.cc Add streams() to RtpReceiverInterface and implementations. 2017-11-22 09:04:17 +00:00
rtpreceiver.h Add streams() to RtpReceiverInterface and implementations. 2017-11-22 09:04:17 +00:00
rtpsender.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
rtpsender.h Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
rtpsenderreceiver_unittest.cc Add streams() to RtpReceiverInterface and implementations. 2017-11-22 09:04:17 +00:00
rtptransceiver.cc Add SDP semantics option to RTCConfiguration 2017-11-21 02:09:03 +00:00
rtptransceiver.h Add SDP semantics option to RTCConfiguration 2017-11-21 02:09:03 +00:00
rtptransport.cc Reland: Replaced the SignalSelectedCandidatePairChanged with a new signal. 2017-11-13 22:50:11 +00:00
rtptransport.h Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
rtptransport_unittest.cc Fixing some clang-tidy findings. 2017-11-21 16:43:07 +00:00
rtptransportinternal.h Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
rtptransportinternaladapter.h Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
rtptransporttestutil.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
sctputils.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
sctputils.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
sctputils_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
sdputils.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
sdputils.h Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
srtpfilter.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
srtpfilter.h Fix ortc_api circular deps. 2017-11-15 13:31:51 +00:00
srtpfilter_unittest.cc Fix ortc_api circular deps. 2017-11-15 13:31:51 +00:00
srtpsession.cc Remove the SetEncryptedHeaderExtensionIds methods. 2017-11-11 01:14:35 +00:00
srtpsession.h Remove the SetEncryptedHeaderExtensionIds methods. 2017-11-11 01:14:35 +00:00
srtpsession_unittest.cc Remove the SetEncryptedHeaderExtensionIds methods. 2017-11-11 01:14:35 +00:00
srtptestutil.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
srtptransport.cc Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
srtptransport.h Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
srtptransport_unittest.cc Created the DtlsSrtpTransport. 2017-11-20 23:18:22 +00:00
statscollector.cc Add parallel stats interface with optional stats to APM. 2017-11-20 13:13:20 +00:00
statscollector.h Add parallel stats interface with optional stats to APM. 2017-11-20 13:13:20 +00:00
statscollector_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
streamcollection.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
trackmediainfomap.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
trackmediainfomap.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
trackmediainfomap_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
transportcontroller.cc Reland: Replaced the SignalSelectedCandidatePairChanged with a new signal. 2017-11-13 22:50:11 +00:00
transportcontroller.h Remove QUIC transport/data channel 2017-10-24 16:14:18 +00:00
transportcontroller_unittest.cc Move the TransportController from p2p/base to pc/. 2017-09-29 18:20:07 +00:00
videocapturertracksource.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
videocapturertracksource.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
videocapturertracksource_unittest.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
videotrack.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
videotrack.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
videotrack_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
videotracksource.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
videotracksource.h Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
voicechannel.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
webrtcsdp.cc Fix ortc_api circular deps. 2017-11-15 13:31:51 +00:00
webrtcsdp.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
webrtcsdp_unittest.cc Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00
webrtcsessiondescriptionfactory.cc Optional: Use nullopt and implicit construction in /pc 2017-11-21 17:53:37 +00:00
webrtcsessiondescriptionfactory.h Enable cpplint in pc/ 2017-10-30 18:08:29 +00:00