summaryrefslogtreecommitdiffstats
path: root/remoting/host/mouse_shape_pump.h
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2015-02-13 10:45:30 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-13 18:46:39 +0000
commit1afb35a1a63e53497245625b1052be436830a95f (patch)
tree6510ec4213680732115ac7a8c2d642b1e41799de /remoting/host/mouse_shape_pump.h
parent0f2586fc1b71a03fa6a66aa5d7e1e9979d17a05c (diff)
downloadchromium_src-1afb35a1a63e53497245625b1052be436830a95f.zip
chromium_src-1afb35a1a63e53497245625b1052be436830a95f.tar.gz
chromium_src-1afb35a1a63e53497245625b1052be436830a95f.tar.bz2
Cleanup VideoFramePump.
1. Threading logic for the capture thread has been moved to ScreenCapturerProxy. 2. Mouse shape handling has been moved to MouseShapePump. BUG=455818 Review URL: https://codereview.chromium.org/883673004 Cr-Commit-Position: refs/heads/master@{#316247}
Diffstat (limited to 'remoting/host/mouse_shape_pump.h')
-rw-r--r--remoting/host/mouse_shape_pump.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/remoting/host/mouse_shape_pump.h b/remoting/host/mouse_shape_pump.h
new file mode 100644
index 0000000..cc001893
--- /dev/null
+++ b/remoting/host/mouse_shape_pump.h
@@ -0,0 +1,56 @@
+// Copyright 2015 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.
+
+#ifndef REMOTING_HOST_MOUSE_SHAPE_PUMP_H_
+#define REMOTING_HOST_MOUSE_SHAPE_PUMP_H_
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace webrtc {
+class MouseCursorMonitor;
+} // namespace webrtc
+
+namespace remoting {
+
+namespace protocol {
+class CursorShapeStub;
+class CursorShapeInfo;
+} // namespace protocol
+
+// MouseShapePump is responsible for capturing mouse shape using
+// MouseCursorMonitor and sending it to a CursorShapeStub.
+class MouseShapePump {
+ public:
+ MouseShapePump(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor,
+ protocol::CursorShapeStub* cursor_shape_stub);
+ ~MouseShapePump();
+
+ private:
+ class Core;
+
+ void OnCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor);
+
+ base::ThreadChecker thread_checker_;
+
+ scoped_ptr<Core> core_;
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
+ protocol::CursorShapeStub* cursor_shape_stub_;
+
+ base::WeakPtrFactory<MouseShapePump> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(MouseShapePump);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_MOUSE_SHAPE_PUMP_H_