Make deprecated OnMouseCursorPosition overload optional.
The only callers or non-trivial implementations of this that I could find are in remoting/ in Chromium, which I plan on fixing once this gets rolled. Bug: chromium:1043325 Change-Id: Id5a33fc09bb066f979876b2a7dcbc3dc5c2d3dd9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166560 Commit-Queue: Jamie Walch <jamiewalch@chromium.org> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Cr-Commit-Position: refs/heads/master@{#30310}
This commit is contained in:
@ -197,12 +197,6 @@ void DesktopAndCursorComposer::OnMouseCursor(MouseCursor* cursor) {
|
|||||||
cursor_.reset(cursor);
|
cursor_.reset(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopAndCursorComposer::OnMouseCursorPosition(
|
|
||||||
MouseCursorMonitor::CursorState state,
|
|
||||||
const DesktopVector& position) {
|
|
||||||
RTC_NOTREACHED();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopAndCursorComposer::OnMouseCursorPosition(
|
void DesktopAndCursorComposer::OnMouseCursorPosition(
|
||||||
const DesktopVector& position) {
|
const DesktopVector& position) {
|
||||||
cursor_position_ = position;
|
cursor_position_ = position;
|
||||||
|
@ -63,8 +63,6 @@ class RTC_EXPORT DesktopAndCursorComposer
|
|||||||
|
|
||||||
// MouseCursorMonitor::Callback interface.
|
// MouseCursorMonitor::Callback interface.
|
||||||
void OnMouseCursor(MouseCursor* cursor) override;
|
void OnMouseCursor(MouseCursor* cursor) override;
|
||||||
void OnMouseCursorPosition(MouseCursorMonitor::CursorState state,
|
|
||||||
const DesktopVector& position) override;
|
|
||||||
void OnMouseCursorPosition(const DesktopVector& position) override;
|
void OnMouseCursorPosition(const DesktopVector& position) override;
|
||||||
|
|
||||||
const std::unique_ptr<DesktopCapturer> desktop_capturer_;
|
const std::unique_ptr<DesktopCapturer> desktop_capturer_;
|
||||||
|
@ -54,7 +54,7 @@ class MouseCursorMonitor {
|
|||||||
// relative to the |window| specified in the constructor.
|
// relative to the |window| specified in the constructor.
|
||||||
// Deprecated: use the following overload instead.
|
// Deprecated: use the following overload instead.
|
||||||
virtual void OnMouseCursorPosition(CursorState state,
|
virtual void OnMouseCursorPosition(CursorState state,
|
||||||
const DesktopVector& position) = 0;
|
const DesktopVector& position) {}
|
||||||
|
|
||||||
// Called in response to Capture(). |position| indicates cursor absolute
|
// Called in response to Capture(). |position| indicates cursor absolute
|
||||||
// position on the system in fullscreen coordinate, i.e. the top-left
|
// position on the system in fullscreen coordinate, i.e. the top-left
|
||||||
@ -62,7 +62,6 @@ class MouseCursorMonitor {
|
|||||||
// The coordinates of the position is controlled by OS, but it's always
|
// The coordinates of the position is controlled by OS, but it's always
|
||||||
// consistent with DesktopFrame.rect().top_left().
|
// consistent with DesktopFrame.rect().top_left().
|
||||||
// TODO(zijiehe): Ensure all implementations return the absolute position.
|
// TODO(zijiehe): Ensure all implementations return the absolute position.
|
||||||
// TODO(zijiehe): Make this function pure virtual after Chromium changes.
|
|
||||||
// TODO(zijiehe): Current this overload works correctly only when capturing
|
// TODO(zijiehe): Current this overload works correctly only when capturing
|
||||||
// mouse cursor against fullscreen.
|
// mouse cursor against fullscreen.
|
||||||
virtual void OnMouseCursorPosition(const DesktopVector& position) {}
|
virtual void OnMouseCursorPosition(const DesktopVector& position) {}
|
||||||
|
@ -34,11 +34,6 @@ class MouseCursorMonitorTest : public ::testing::Test,
|
|||||||
cursor_image_.reset(cursor_image);
|
cursor_image_.reset(cursor_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnMouseCursorPosition(MouseCursorMonitor::CursorState state,
|
|
||||||
const DesktopVector& position) override {
|
|
||||||
RTC_NOTREACHED();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnMouseCursorPosition(const DesktopVector& position) override {
|
void OnMouseCursorPosition(const DesktopVector& position) override {
|
||||||
position_ = position;
|
position_ = position;
|
||||||
position_received_ = true;
|
position_received_ = true;
|
||||||
|
Reference in New Issue
Block a user