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

Unified Diff: remoting/host/ipc_mouse_cursor_monitor.cc

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/ipc_mouse_cursor_monitor.h ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_mouse_cursor_monitor.cc
diff --git a/remoting/host/ipc_mouse_cursor_monitor.cc b/remoting/host/ipc_mouse_cursor_monitor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8284a6afbc0483599fb8c11eac8e30943d96fb58
--- /dev/null
+++ b/remoting/host/ipc_mouse_cursor_monitor.cc
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/ipc_mouse_cursor_monitor.h"
+
+#include "remoting/host/desktop_session_proxy.h"
+#include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h"
+
+namespace remoting {
+
+IpcMouseCursorMonitor::IpcMouseCursorMonitor(
+ scoped_refptr<DesktopSessionProxy> desktop_session_proxy)
+ : callback_(NULL),
+ desktop_session_proxy_(desktop_session_proxy),
+ weak_factory_(this) {
+}
+
+IpcMouseCursorMonitor::~IpcMouseCursorMonitor() {}
+
+void IpcMouseCursorMonitor::Init(Callback* callback, Mode mode) {
+ DCHECK(!callback_);
+ DCHECK(callback);
+ DCHECK_EQ(webrtc::MouseCursorMonitor::SHAPE_ONLY, mode);
+ callback_ = callback;
+ desktop_session_proxy_->SetMouseCursorMonitor(weak_factory_.GetWeakPtr());
+}
+
+void IpcMouseCursorMonitor::Capture() {
+ // Ignore. DesktopSessionAgent will capture the cursor at the same time it
+ // captures a screen frame when |IpcVideoFrameCapturer::Capture()| is called.
+ // This saves an IPC roundtrip.
+}
+
+void IpcMouseCursorMonitor::OnMouseCursor(
+ scoped_ptr<webrtc::MouseCursor> cursor) {
+ DCHECK(callback_);
+ callback_->OnMouseCursor(cursor.release());
+}
+
+} // namespace remoting
+
« no previous file with comments | « remoting/host/ipc_mouse_cursor_monitor.h ('k') | remoting/host/ipc_video_frame_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698