Allow receive-only use of datagram transport for data channels.

Adds a field trial and configuration parameter to control whether
datagram transport may be used for data channels in a receive-only
manner.  By default, if use_datagram_transport_for_data_channels is
enabled, PeerConnection will create a datagram transport and offer its
use for outgoing calls as well as accept incoming offers with compatible
datagram transport parameters.

With this change, a receive_only mode is added for datagram transport
data channels.  When receive_only is set, the PeerConnection will not
create or offer datagram transports for outgoing calls, but will accept
incoming calls that offer compatible datagram transport parameters.

Bug: webrtc:9719
Change-Id: I35667bcc408ea4bbc61155898e6d2472dd262711
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154463
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29327}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index f2cc696..a417641 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -632,6 +632,14 @@
     // of SCTP-DTLS.
     absl::optional<bool> use_datagram_transport_for_data_channels;
 
+    // If true, this PeerConnection will only use datagram transport for data
+    // channels when receiving an incoming offer that includes datagram
+    // transport parameters.  It will not request use of a datagram transport
+    // when it creates the initial, outgoing offer.
+    // This setting only applies when |use_datagram_transport_for_data_channels|
+    // is true.
+    absl::optional<bool> use_datagram_transport_for_data_channels_receive_only;
+
     // Defines advanced optional cryptographic settings related to SRTP and
     // frame encryption for native WebRTC. Setting this will overwrite any
     // settings set in PeerConnectionFactory (which is deprecated).