Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Unified Diff: remoting/host/desktop_session_agent.h

Issue 92473002: Use webrtc::MouseCursorMonitor for cursor shapes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_agent.h
diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h
index 2f981948bb8e2b7aa05781a4bd85f3dd3651bb21..b9bd8a43f914f7c4f9858d2ab4c40c8bdc6457ea 100644
--- a/remoting/host/desktop_session_agent.h
+++ b/remoting/host/desktop_session_agent.h
@@ -18,6 +18,7 @@
#include "remoting/host/client_session_control.h"
#include "remoting/protocol/clipboard_stub.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
+#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
namespace IPC {
@@ -47,7 +48,7 @@ class DesktopSessionAgent
: public base::RefCountedThreadSafe<DesktopSessionAgent>,
public IPC::Listener,
public webrtc::DesktopCapturer::Callback,
- public webrtc::ScreenCapturer::MouseShapeObserver,
+ public webrtc::MouseCursorMonitor::Callback,
public ClientSessionControl {
public:
class Delegate {
@@ -78,9 +79,11 @@ class DesktopSessionAgent
virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) OVERRIDE;
- // webrtc::ScreenCapturer::MouseShapeObserver implementation.
- virtual void OnCursorShapeChanged(
- webrtc::MouseCursorShape* cursor_shape) OVERRIDE;
+ // webrtc::MouseCursorMonitor::Callback implementation.
+ virtual void OnMouseCursor(webrtc::MouseCursor* cursor) OVERRIDE;
+ virtual void OnMouseCursorPosition(
+ webrtc::MouseCursorMonitor::CursorState state,
+ const webrtc::DesktopVector& position) OVERRIDE;
// Forwards a local clipboard event though the IPC channel to the network
// process.
@@ -141,11 +144,13 @@ class DesktopSessionAgent
// Posted to |audio_capture_task_runner_| to stop the audio capturer.
void StopAudioCapturer();
- // Posted to |video_capture_task_runner_| to start the video capturer.
- void StartVideoCapturer();
+ // Posted to |video_capture_task_runner_| to start the video capturer and the
+ // mouse cursor monitor.
+ void StartVideoCapturerAndMouseMonitor();
- // Posted to |video_capture_task_runner_| to stop the video capturer.
- void StopVideoCapturer();
+ // Posted to |video_capture_task_runner_| to stop the video capturer and the
+ // mouse cursor monitor.
+ void StopVideoCapturerAndMouseMonitor();
private:
class SharedBuffer;
@@ -216,6 +221,9 @@ class DesktopSessionAgent
// Captures the screen.
scoped_ptr<webrtc::ScreenCapturer> video_capturer_;
+ // Captures mouse shapes.
+ scoped_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor_;
+
// Keep reference to the last frame sent to make sure shared buffer is alive
// before it's received.
scoped_ptr<webrtc::DesktopFrame> last_frame_;
« no previous file with comments | « remoting/host/desktop_environment.h ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698