mouse_cursor_monitor_aura.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_
  5. #define REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_
  6. #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
  7. #include "ui/base/cursor/cursor.h"
  8. #include "ui/gfx/geometry/point.h"
  9. namespace remoting {
  10. // Monitors changes in cursor shape and location. It can be constructed on any
  11. // thread but all public methods must be called on the capturer thread.
  12. class MouseCursorMonitorAura : public webrtc::MouseCursorMonitor {
  13. public:
  14. MouseCursorMonitorAura();
  15. MouseCursorMonitorAura(const MouseCursorMonitorAura&) = delete;
  16. MouseCursorMonitorAura& operator=(const MouseCursorMonitorAura&) = delete;
  17. // webrtc::MouseCursorMonitor implementation.
  18. void Init(Callback* callback, Mode mode) override;
  19. void Capture() override;
  20. private:
  21. void NotifyCursorChanged(const ui::Cursor& cursor);
  22. Callback* callback_;
  23. Mode mode_;
  24. ui::Cursor last_cursor_;
  25. gfx::Point last_mouse_location_;
  26. };
  27. } // namespace remoting
  28. #endif // REMOTING_HOST_CHROMEOS_MOUSE_CURSOR_MONITOR_AURA_H_