#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/host/mouse_shape_pump.h"
#include <stdint.h>
#include <utility>
#include "base/functional/bind.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "remoting/proto/control.pb.h"
#include "remoting/protocol/cursor_shape_stub.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"
namespace {
constexpr base::TimeDelta kMaxCursorCaptureInterval = …;
constexpr base::TimeDelta kMinCursorCaptureInterval = …;
}
namespace remoting {
MouseShapePump::MouseShapePump(
std::unique_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor,
protocol::CursorShapeStub* cursor_shape_stub)
: … { … }
MouseShapePump::~MouseShapePump() { … }
void MouseShapePump::SetCursorCaptureInterval(base::TimeDelta new_interval) { … }
void MouseShapePump::SetMouseCursorMonitorCallback(
webrtc::MouseCursorMonitor::Callback* callback) { … }
void MouseShapePump::Capture() { … }
void MouseShapePump::StartCaptureTimer(base::TimeDelta capture_interval) { … }
void MouseShapePump::OnMouseCursor(webrtc::MouseCursor* cursor) { … }
void MouseShapePump::OnMouseCursorPosition(
const webrtc::DesktopVector& position) { … }
}