#include "remoting/host/mouse_cursor_monitor_proxy.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/task/single_thread_task_runner.h"
#include "build/chromeos_buildflags.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "remoting/host/chromeos/mouse_cursor_monitor_aura.h"
#endif
#if defined(REMOTING_USE_X11)
#include "remoting/host/linux/wayland_utils.h"
#endif
namespace remoting {
class MouseCursorMonitorProxy::Core
: public webrtc::MouseCursorMonitor::Callback { … };
MouseCursorMonitorProxy::Core::Core(
base::WeakPtr<MouseCursorMonitorProxy> proxy)
: … { … }
MouseCursorMonitorProxy::Core::~Core() { … }
void MouseCursorMonitorProxy::Core::CreateMouseCursorMonitor(
const webrtc::DesktopCaptureOptions& options) { … }
void MouseCursorMonitorProxy::Core::Init(
webrtc::MouseCursorMonitor::Mode mode) { … }
void MouseCursorMonitorProxy::Core::Capture() { … }
void MouseCursorMonitorProxy::Core::SetMouseCursorMonitorForTests(
std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor) { … }
void MouseCursorMonitorProxy::Core::OnMouseCursor(webrtc::MouseCursor* cursor) { … }
void MouseCursorMonitorProxy::Core::OnMouseCursorPosition(
const webrtc::DesktopVector& position) { … }
MouseCursorMonitorProxy::MouseCursorMonitorProxy(
scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
const webrtc::DesktopCaptureOptions& options)
: … { … }
MouseCursorMonitorProxy::~MouseCursorMonitorProxy() { … }
void MouseCursorMonitorProxy::Init(Callback* callback, Mode mode) { … }
void MouseCursorMonitorProxy::Capture() { … }
void MouseCursorMonitorProxy::SetMouseCursorMonitorForTests(
std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor) { … }
void MouseCursorMonitorProxy::OnMouseCursor(
std::unique_ptr<webrtc::MouseCursor> cursor) { … }
void MouseCursorMonitorProxy::OnMouseCursorPosition(
const webrtc::DesktopVector& position) { … }
}