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

Unified Diff: remoting/host/desktop_session_proxy.h

Issue 92473002: Use webrtc::MouseCursorMonitor for cursor shapes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a comment. Created 7 years, 1 month 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
Index: remoting/host/desktop_session_proxy.h
diff --git a/remoting/host/desktop_session_proxy.h b/remoting/host/desktop_session_proxy.h
index b39ecbbef74608237df5ac162b1156737e004e42..fecbb82e8f410595d18c6a057f28925b6e77bc0c 100644
--- a/remoting/host/desktop_session_proxy.h
+++ b/remoting/host/desktop_session_proxy.h
@@ -32,7 +32,12 @@ class ChannelProxy;
class Message;
} // namespace IPC
+namespace webrtc {
+class MouseCursor;
+} // namespace webrtc
+
struct SerializedDesktopFrame;
+struct SerializedMouseCursor;
namespace remoting {
@@ -42,6 +47,7 @@ class ClientSessionControl;
class DesktopSessionConnector;
struct DesktopSessionProxyTraits;
class IpcAudioCapturer;
+class IpcMouseCursorMonitor;
class IpcVideoFrameCapturer;
class ScreenControls;
@@ -78,6 +84,7 @@ class DesktopSessionProxy
scoped_ptr<InputInjector> CreateInputInjector();
scoped_ptr<ScreenControls> CreateScreenControls();
scoped_ptr<webrtc::ScreenCapturer> CreateVideoCapturer();
+ scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor();
std::string GetCapabilities() const;
void SetCapabilities(const std::string& capabilities);
@@ -111,6 +118,11 @@ class DesktopSessionProxy
void SetVideoCapturer(
const base::WeakPtr<IpcVideoFrameCapturer> video_capturer);
+ // Stores |mouse_cursor_monitor| to be used to post mouse cursor changes.
+ // Called on the |video_capture_task_runner_| thread.
+ void SetMouseCursorMonitor(
+ const base::WeakPtr<IpcMouseCursorMonitor>& mouse_cursor_monitor);
+
// APIs used to implement the InputInjector interface.
void InjectClipboardEvent(const protocol::ClipboardEvent& event);
void InjectKeyEvent(const protocol::KeyEvent& event);
@@ -147,8 +159,8 @@ class DesktopSessionProxy
// Handles CaptureCompleted notification from the desktop session agent.
void OnCaptureCompleted(const SerializedDesktopFrame& serialized_frame);
- // Handles CursorShapeChanged notification from the desktop session agent.
- void OnCursorShapeChanged(const webrtc::MouseCursorShape& cursor_shape);
+ // Handles MouseCursor notification from the desktop session agent.
+ void OnMouseCursor(const SerializedMouseCursor& mouse_cursor);
// Handles InjectClipboardEvent request from the desktop integration process.
void OnInjectClipboardEvent(const std::string& serialized_event);
@@ -157,9 +169,9 @@ class DesktopSessionProxy
// passing |frame|.
void PostCaptureCompleted(scoped_ptr<webrtc::DesktopFrame> frame);
- // Posts OnCursorShapeChanged() to |video_capturer_| on the video thread,
- // passing |cursor_shape|.
- void PostCursorShape(scoped_ptr<webrtc::MouseCursorShape> cursor_shape);
+ // Posts OnMouseCursor() to |mouse_cursor_monitor_| on the video thread,
+ // passing |mouse_cursor|.
+ void PostMouseCursor(scoped_ptr<webrtc::MouseCursor> mouse_cursor);
// Sends a message to the desktop session agent. The message is silently
// deleted if the channel is broken.
@@ -192,6 +204,9 @@ class DesktopSessionProxy
// Points to the video capturer receiving captured video frames.
base::WeakPtr<IpcVideoFrameCapturer> video_capturer_;
+ // Points to the mouse cursor monitor receiving mouse cursor changes.
+ base::WeakPtr<IpcMouseCursorMonitor> mouse_cursor_monitor_;
+
// IPC channel to the desktop session agent.
scoped_ptr<IPC::ChannelProxy> desktop_channel_;

Powered by Google App Engine
This is Rietveld 408576698