OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef REMOTING_HOST_MOUSE_SHAPE_PUMP_H_ |
| 6 #define REMOTING_HOST_MOUSE_SHAPE_PUMP_H_ |
| 7 |
| 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" |
| 12 |
| 13 namespace base { |
| 14 class SingleThreadTaskRunner; |
| 15 } // namespace base |
| 16 |
| 17 namespace webrtc { |
| 18 class MouseCursorMonitor; |
| 19 } // namespace webrtc |
| 20 |
| 21 namespace remoting { |
| 22 |
| 23 namespace protocol { |
| 24 class CursorShapeStub; |
| 25 class CursorShapeInfo; |
| 26 } // namespace protocol |
| 27 |
| 28 // MouseShapePump is responsible for capturing mouse shape using |
| 29 // MouseCursorMonitor and sending it to a CursorShapeStub. |
| 30 class MouseShapePump { |
| 31 public: |
| 32 MouseShapePump( |
| 33 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, |
| 34 scoped_ptr<webrtc::MouseCursorMonitor> mouse_cursor_monitor, |
| 35 protocol::CursorShapeStub* cursor_shape_stub); |
| 36 ~MouseShapePump(); |
| 37 |
| 38 private: |
| 39 class Core; |
| 40 |
| 41 void OnCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor); |
| 42 |
| 43 base::ThreadChecker thread_checker_; |
| 44 |
| 45 scoped_ptr<Core> core_; |
| 46 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; |
| 47 protocol::CursorShapeStub* cursor_shape_stub_; |
| 48 |
| 49 base::WeakPtrFactory<MouseShapePump> weak_factory_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(MouseShapePump); |
| 52 }; |
| 53 |
| 54 } // namespace remoting |
| 55 |
| 56 #endif // REMOTING_HOST_MOUSE_SHAPE_PUMP_H_ |
OLD | NEW |