Use desktop relative mouse cursor position in DesktopAndCursorComposer

This change adds one temporary use_desktop_relative_cursor_position_ flag in
DesktopAndCursorComposer. It's automatically set according to the consturctor
When the flag is true, DesktopAndCursorComposer uses the newly added
MouseCursorMonitor::Callback::OnCursorPosition(), which is the absolute position
of the cursor in the full desktop coordinate, and DesktopCapturer::IsOccluded()
to decide whether the mouse cursor should be drawn on the DesktopFrame.
When the flag is false, the behavior of DesktopAndCursorComposer is unchanged.

This flag will be removed together with the deprecated constructor of

Currently the new DesktopAndCursorComposer constructor is not used, so no
behavior change is expected.

Bug: webrtc:7950
Change-Id: I7235e32fa325a21c4a2594613764a9f81d76dfbc
Commit-Queue: Zijie He <>
Reviewed-by: Jamie Walch <>
Cr-Original-Commit-Position: refs/heads/master@{#19592}
Cr-Mirrored-Commit: 85e6a4ba1372f21b8648ffaad2fd19a76a8bb316
6 files changed