[desktopCapture] clean up relative positon processing

After deploying the new DesktopAndCursorComposer ctor in chromium in cl
https://chromium-review.googlesource.com/c/chromium/src/+/980668
The old ctor and relative stuffs can be removed now.

Bug: webrtc:9072
Change-Id: Ibbf23a374883c096b13169bd5289a2d4ece539fa
Reviewed-on: https://webrtc-review.googlesource.com/65341
Commit-Queue: Brave Yao <braveyao@webrtc.org>
Reviewed-by: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#22679}
diff --git a/modules/desktop_capture/desktop_and_cursor_composer.h b/modules/desktop_capture/desktop_and_cursor_composer.h
index c88075a..7dff710 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer.h
+++ b/modules/desktop_capture/desktop_and_cursor_composer.h
@@ -20,23 +20,12 @@
 
 namespace webrtc {
 
-template <bool use_desktop_relative_cursor_position>
-class DesktopAndCursorComposerTest;
-
 // A wrapper for DesktopCapturer that also captures mouse using specified
 // MouseCursorMonitor and renders it on the generated streams.
 class DesktopAndCursorComposer : public DesktopCapturer,
                                  public DesktopCapturer::Callback,
                                  public MouseCursorMonitor::Callback {
  public:
-  // Creates a new blender that captures mouse cursor using |mouse_monitor| and
-  // renders it into the frames generated by |desktop_capturer|. If
-  // |mouse_monitor| is NULL the frames are passed unmodified. Takes ownership
-  // of both arguments.
-  // Deprecated: use the constructor below.
-  DesktopAndCursorComposer(DesktopCapturer* desktop_capturer,
-                           MouseCursorMonitor* mouse_monitor);
-
   // Creates a new blender that captures mouse cursor using
   // MouseCursorMonitor::Create(options) and renders it into the frames
   // generated by |desktop_capturer|.
@@ -54,14 +43,12 @@
 
  private:
   // Allows test cases to use a fake MouseCursorMonitor implementation.
-  friend class DesktopAndCursorComposerTest<true>;
-  friend class DesktopAndCursorComposerTest<false>;
+  friend class DesktopAndCursorComposerTest;
 
   // Constructor to delegate both deprecated and new constructors and allows
   // test cases to use a fake MouseCursorMonitor implementation.
   DesktopAndCursorComposer(DesktopCapturer* desktop_capturer,
-                           MouseCursorMonitor* mouse_monitor,
-                           bool use_desktop_relative_cursor_position);
+                           MouseCursorMonitor* mouse_monitor);
 
   // DesktopCapturer::Callback interface.
   void OnCaptureResult(DesktopCapturer::Result result,
@@ -75,20 +62,10 @@
 
   const std::unique_ptr<DesktopCapturer> desktop_capturer_;
   const std::unique_ptr<MouseCursorMonitor> mouse_monitor_;
-  // This is a temporary flag to decide how to use the |mouse_monitor_|.
-  // If it's true, DesktopAndCursorComposer will use the absolute position from
-  // MouseCursorMonitor but ignore the MouseCursorMonitor::CursorState.
-  // Otherwise MouseCursorMonitor::CursorState is respected. This flag is false
-  // when the deprecated constructor is used, and true when the new one is used.
-  // This flag will be removed together with the deprecated constructor.
-  const bool use_desktop_relative_cursor_position_;
 
   DesktopCapturer::Callback* callback_;
 
   std::unique_ptr<MouseCursor> cursor_;
-  // This field is irrelevant if |use_desktop_relative_cursor_position_| is
-  // true.
-  MouseCursorMonitor::CursorState cursor_state_;
   DesktopVector cursor_position_;
 
   RTC_DISALLOW_COPY_AND_ASSIGN(DesktopAndCursorComposer);