Promotoing webrtc::CryptoOptions to RTCConfiguration.

With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.

To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.

Got LGTM offline from Sami, adding him to TBR if he has any further comments.

TBR=sakal@webrtc.org

Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 021be7d..6504f53 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -406,6 +406,7 @@
     // Use new combined audio/video bandwidth estimation?
     absl::optional<bool> combined_audio_video_bwe;
 
+    // TODO(bugs.webrtc.org/9891) - Move to crypto_options
     // Can be used to disable DTLS-SRTP. This should never be done, but can be
     // useful for testing purposes, for example in setting up a loopback call
     // with a single PeerConnection.
@@ -568,6 +569,7 @@
     // For all other users, specify kUnifiedPlan.
     SdpSemantics sdp_semantics = SdpSemantics::kPlanB;
 
+    // TODO(bugs.webrtc.org/9891) - Move to crypto_options or remove.
     // Actively reset the SRTP parameters whenever the DTLS transports
     // underneath are reset for every offer/answer negotiation.
     // This is only intended to be a workaround for crbug.com/835958
@@ -581,6 +583,11 @@
     // provided.
     bool use_media_transport = false;
 
+    // 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).
+    absl::optional<CryptoOptions> crypto_options;
+
     //
     // Don't forget to update operator== if adding something.
     //