[remoting host] Allow WebrtcVideoStream to receive encode-events.

WebrtcVideoStream currently manages the encode/send pipeline by directly
calling the encoder, passing in a private method as a callback. With
has_internal_source==false, it can no longer call the encoder itself,
so another means of receiving OnFrameEncoded event is needed.

With this CL, WebrtcVideoStream receives the notifications (via
VideoChannelStateObserver interface) and passes them directly to the
video-scheduler. In followup CLs, the observer interface will be
expanded to include frame-encoded and frame-sent events (and other
encode events as needed).

This CL also removes OnChannelParameters(), which was unused because
the corresponding method had been removed from
webrtc::VideoEncoder interface - see
http://crrev.com/4b097cc4cc8f26329fa90ef568fef23749a50e11

Bug: 1192865
Change-Id: If01c26f9dae4b9a548b5fdbf75b0735de3050457
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2830128
Reviewed-by: Joe Downing <[email protected]>
Commit-Queue: Lambros Lambrou <[email protected]>
Cr-Commit-Position: refs/heads/master@{#874007}
diff --git a/remoting/protocol/webrtc_frame_scheduler.h b/remoting/protocol/webrtc_frame_scheduler.h
index b7e2016..4cd9fa00 100644
--- a/remoting/protocol/webrtc_frame_scheduler.h
+++ b/remoting/protocol/webrtc_frame_scheduler.h
@@ -8,25 +8,24 @@
 #include "base/callback_forward.h"
 #include "base/memory/weak_ptr.h"
 #include "remoting/codec/webrtc_video_encoder.h"
+#include "remoting/protocol/video_channel_state_observer.h"
 
 namespace remoting {
 namespace protocol {
 
 struct HostFrameStats;
-class WebrtcDummyVideoEncoderFactory;
 
 // An abstract interface for frame schedulers, which are responsible for
 // scheduling when video frames are captured and for defining encoding
 // parameters for each frame.
-class WebrtcFrameScheduler {
+class WebrtcFrameScheduler : public VideoChannelStateObserver {
  public:
-  WebrtcFrameScheduler() {}
-  virtual ~WebrtcFrameScheduler() {}
+  WebrtcFrameScheduler() = default;
+  ~WebrtcFrameScheduler() override = default;
 
   // Starts the scheduler. |capture_callback| will be called whenever a new
   // frame should be captured.
-  virtual void Start(WebrtcDummyVideoEncoderFactory* video_encoder_factory,
-                     const base::RepeatingClosure& capture_callback) = 0;
+  virtual void Start(const base::RepeatingClosure& capture_callback) = 0;
 
   // Pause and resumes the scheduler.
   virtual void Pause(bool pause) = 0;