summaryrefslogtreecommitdiffstats
path: root/remoting/host/desktop_session_proxy.cc
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 05:52:07 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 05:52:07 +0000
commit68e103af1202ad37deaf6b4a23334cad0ec71f52 (patch)
treec393fa5753420799c80f0e867b562d836ddaff7d /remoting/host/desktop_session_proxy.cc
parentc0c789a71c85025325d2e3d95a0fbb277e34dbb5 (diff)
downloadchromium_src-68e103af1202ad37deaf6b4a23334cad0ec71f52.zip
chromium_src-68e103af1202ad37deaf6b4a23334cad0ec71f52.tar.gz
chromium_src-68e103af1202ad37deaf6b4a23334cad0ec71f52.tar.bz2
Revert 248045 "Use webrtc::MouseCursorMonitor for cursor shapes"
> Use webrtc::MouseCursorMonitor for cursor shapes > > Use webrtc::MouseCursorMonitor for cursor shapes instead of > webrtc::VideoFrameCapturer, in preparation for deprecating cursor shape > functionality in the latter. > > BUG=324033 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247689 > > Review URL: https://codereview.chromium.org/92473002 This caused errors on a windows memory bot. See bug for details. TBR=dcaiafa@chromium.org Review URL: https://codereview.chromium.org/151163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_session_proxy.cc')
-rw-r--r--remoting/host/desktop_session_proxy.cc36
1 files changed, 10 insertions, 26 deletions
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index 982870a..058a2f4 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -19,7 +19,6 @@
#include "remoting/host/desktop_session_connector.h"
#include "remoting/host/ipc_audio_capturer.h"
#include "remoting/host/ipc_input_injector.h"
-#include "remoting/host/ipc_mouse_cursor_monitor.h"
#include "remoting/host/ipc_screen_controls.h"
#include "remoting/host/ipc_video_frame_capturer.h"
#include "remoting/proto/audio.pb.h"
@@ -27,7 +26,6 @@
#include "remoting/proto/event.pb.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
-#include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
#include "third_party/webrtc/modules/desktop_capture/shared_memory.h"
#if defined(OS_WIN)
@@ -146,12 +144,6 @@ scoped_ptr<webrtc::ScreenCapturer> DesktopSessionProxy::CreateVideoCapturer() {
return scoped_ptr<webrtc::ScreenCapturer>(new IpcVideoFrameCapturer(this));
}
-scoped_ptr<webrtc::MouseCursorMonitor>
- DesktopSessionProxy::CreateMouseCursorMonitor() {
- return scoped_ptr<webrtc::MouseCursorMonitor>(
- new IpcMouseCursorMonitor(this));
-}
-
std::string DesktopSessionProxy::GetCapabilities() const {
std::string result = kRateLimitResizeRequests;
// Ask the client to send its resolution unconditionally.
@@ -191,8 +183,8 @@ bool DesktopSessionProxy::OnMessageReceived(const IPC::Message& message) {
OnAudioPacket)
IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_CaptureCompleted,
OnCaptureCompleted)
- IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_MouseCursor,
- OnMouseCursor)
+ IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_CursorShapeChanged,
+ OnCursorShapeChanged)
IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_CreateSharedBuffer,
OnCreateSharedBuffer)
IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer,
@@ -326,13 +318,6 @@ void DesktopSessionProxy::SetVideoCapturer(
video_capturer_ = video_capturer;
}
-void DesktopSessionProxy::SetMouseCursorMonitor(
- const base::WeakPtr<IpcMouseCursorMonitor>& mouse_cursor_monitor) {
- DCHECK(video_capture_task_runner_->BelongsToCurrentThread());
-
- mouse_cursor_monitor_ = mouse_cursor_monitor;
-}
-
void DesktopSessionProxy::DisconnectSession() {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
@@ -506,12 +491,11 @@ void DesktopSessionProxy::OnCaptureCompleted(
PostCaptureCompleted(frame.Pass());
}
-void DesktopSessionProxy::OnMouseCursor(
- const webrtc::MouseCursor& mouse_cursor) {
+void DesktopSessionProxy::OnCursorShapeChanged(
+ const webrtc::MouseCursorShape& cursor_shape) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
- scoped_ptr<webrtc::MouseCursor> cursor(
- webrtc::MouseCursor::CopyOf(mouse_cursor));
- PostMouseCursor(cursor.Pass());
+ PostCursorShape(scoped_ptr<webrtc::MouseCursorShape>(
+ new webrtc::MouseCursorShape(cursor_shape)));
}
void DesktopSessionProxy::OnInjectClipboardEvent(
@@ -539,14 +523,14 @@ void DesktopSessionProxy::PostCaptureCompleted(
base::Passed(&frame)));
}
-void DesktopSessionProxy::PostMouseCursor(
- scoped_ptr<webrtc::MouseCursor> mouse_cursor) {
+void DesktopSessionProxy::PostCursorShape(
+ scoped_ptr<webrtc::MouseCursorShape> cursor_shape) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
video_capture_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&IpcMouseCursorMonitor::OnMouseCursor, mouse_cursor_monitor_,
- base::Passed(&mouse_cursor)));
+ base::Bind(&IpcVideoFrameCapturer::OnCursorShapeChanged, video_capturer_,
+ base::Passed(&cursor_shape)));
}
void DesktopSessionProxy::SendToDesktop(IPC::Message* message) {