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

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: Removed obsolete #include. Created 6 years, 11 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
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..e4f4bc3f80b077dd7c4b24e2a2f0fc412af87614
--- /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
+

Powered by Google App Engine
This is Rietveld 408576698