commit | 4e19670d3a93d0c78607ded97c040fe9b4b8f18c | [log] [tgz] |
---|---|---|
author | Henrik Boström <hbos@webrtc.org> | Wed Oct 30 10:35:50 2019 +0100 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 30 10:24:44 2019 +0000 |
tree | 6c08299c4d4f0f69f3e070fcc6737759bf9d84ae | |
parent | 9b66114878e2b5812f7016c77146b6804ce0975c [diff] [blame] |
[PeerConnection] Implement parameterless SetLocalDescription(). For background, motivation, requirements and implementation notes, see https://docs.google.com/document/d/1XLwNN2kUIGGTwz9LQ0NwJNkcybi9oKnynUEZB1jGA14/edit?usp=sharing The parameterless SetLocalDescription() will implicitly create an offer or answer to be set by chaining create offer or answer with setting the session description, as per spec: https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription Bug: chromium:980885 Change-Id: Ia430160869df18fd47b756b9adf9e7e23ba8e969 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157444 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29653}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index cc2fa46..55cc593 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h
@@ -991,6 +991,11 @@ // that this method always takes ownership of it. virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, SessionDescriptionInterface* desc) = 0; + // Implicitly creates an offer or answer (depending on the current signaling + // state) and performs SetLocalDescription() with the newly generated session + // description. + // TODO(hbos): Make pure virtual when implemented by downstream projects. + virtual void SetLocalDescription(SetSessionDescriptionObserver* observer) {} // Sets the remote session description. // The PeerConnection takes the ownership of |desc| even if it fails. // The |observer| callback will be called when done.