Injects FrameEncryptorInterface into RtpSender.

This change injects the FrameEncryptorInterface and the FrameDecryptorInterface
into the RtpSenderInterface and RtpReceiverInterface respectively. This is the
second stage of the injection. In a follow up CL non owning pointers to these
values will be passed down into the media channel.

This change also updates the corresponding mock files.

Bug: webrtc:9681
Change-Id: I964084fc270e10af9d1127979e713493e6fbba7d
Reviewed-on: https://webrtc-review.googlesource.com/96625
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24489}
diff --git a/api/rtpsenderinterface.h b/api/rtpsenderinterface.h
index a7eec49..96c2669 100644
--- a/api/rtpsenderinterface.h
+++ b/api/rtpsenderinterface.h
@@ -17,6 +17,7 @@
 #include <string>
 #include <vector>
 
+#include "api/crypto/frameencryptorinterface.h"
 #include "api/dtmfsenderinterface.h"
 #include "api/mediastreaminterface.h"
 #include "api/mediatypes.h"
@@ -63,6 +64,17 @@
   // Returns null for a video sender.
   virtual rtc::scoped_refptr<DtmfSenderInterface> GetDtmfSender() const = 0;
 
+  // Sets a user defined frame encryptor that will encrypt the entire frame
+  // before it is sent across the network. This will encrypt the entire frame
+  // using the user provided encryption mechanism regardless of whether SRTP is
+  // enabled or not.
+  virtual void SetFrameEncryptor(
+      rtc::scoped_refptr<FrameEncryptorInterface> frame_encryptor);
+
+  // Returns a pointer to the frame encryptor set previously by the
+  // user. This can be used to update the state of the object.
+  virtual rtc::scoped_refptr<FrameEncryptorInterface> GetFrameEncryptor() const;
+
  protected:
   ~RtpSenderInterface() override = default;
 };
@@ -81,6 +93,11 @@
 PROXY_METHOD0(RtpParameters, GetParameters);
 PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
 PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender);
+PROXY_METHOD1(void,
+              SetFrameEncryptor,
+              rtc::scoped_refptr<FrameEncryptorInterface>);
+PROXY_CONSTMETHOD0(rtc::scoped_refptr<FrameEncryptorInterface>,
+                   GetFrameEncryptor);
 END_PROXY_MAP()
 
 }  // namespace webrtc