1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_MOUSE_SHAPE_PUMP_H_
6 #define REMOTING_HOST_MOUSE_SHAPE_PUMP_H_
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/threading/thread_checker.h"
14 class SingleThreadTaskRunner
;
18 class MouseCursorMonitor
;
24 class CursorShapeStub
;
25 class CursorShapeInfo
;
26 } // namespace protocol
28 // MouseShapePump is responsible for capturing mouse shape using
29 // MouseCursorMonitor and sending it to a CursorShapeStub.
30 class MouseShapePump
{
33 scoped_refptr
<base::SingleThreadTaskRunner
> capture_task_runner
,
34 scoped_ptr
<webrtc::MouseCursorMonitor
> mouse_cursor_monitor
,
35 protocol::CursorShapeStub
* cursor_shape_stub
);
41 void OnCursorShape(scoped_ptr
<protocol::CursorShapeInfo
> cursor
);
43 base::ThreadChecker thread_checker_
;
45 scoped_ptr
<Core
> core_
;
46 scoped_refptr
<base::SingleThreadTaskRunner
> capture_task_runner_
;
47 protocol::CursorShapeStub
* cursor_shape_stub_
;
49 base::WeakPtrFactory
<MouseShapePump
> weak_factory_
;
51 DISALLOW_COPY_AND_ASSIGN(MouseShapePump
);
54 } // namespace remoting
56 #endif // REMOTING_HOST_MOUSE_SHAPE_PUMP_H_