OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ | 5 #ifndef REMOTING_HOST_LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ |
6 #define LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ | 6 #define REMOTING_HOST_LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/threading/simple_thread.h" | 11 #include "base/threading/simple_thread.h" |
12 #include "remoting/host/local_input_monitor.h" | 12 #include "remoting/host/local_input_monitor.h" |
13 | 13 |
14 typedef struct _XDisplay Display; | 14 typedef struct _XDisplay Display; |
15 | 15 |
16 struct SkIPoint; | 16 struct SkIPoint; |
17 | 17 |
18 namespace remoting { | 18 namespace remoting { |
19 | 19 |
20 class MouseMoveObserver; | 20 class MouseMoveObserver; |
21 | 21 |
22 class LocalInputMonitorThread : public base::SimpleThread { | 22 class LocalInputMonitorThread : public base::SimpleThread { |
23 public: | 23 public: |
24 LocalInputMonitorThread( | 24 LocalInputMonitorThread(MouseMoveObserver* mouse_move_observer, |
25 MouseMoveObserver* mouse_move_observer, | 25 const base::Closure& disconnect_callback); |
26 const base::Closure& disconnect_callback); | |
27 virtual ~LocalInputMonitorThread(); | 26 virtual ~LocalInputMonitorThread(); |
28 | 27 |
29 void Stop(); | 28 void Stop(); |
30 virtual void Run() OVERRIDE; | 29 virtual void Run() OVERRIDE; |
31 | 30 |
32 void LocalMouseMoved(const SkIPoint& pos); | 31 void LocalMouseMoved(const SkIPoint& pos); |
33 void LocalKeyPressed(int key_code, bool down); | 32 void LocalKeyPressed(int key_code, bool down); |
34 | 33 |
35 private: | 34 private: |
36 MouseMoveObserver* mouse_move_observer_; | 35 MouseMoveObserver* mouse_move_observer_; |
37 base::Closure disconnect_callback_; | 36 base::Closure disconnect_callback_; |
38 int wakeup_pipe_[2]; | 37 int wakeup_pipe_[2]; |
39 Display* display_; | 38 Display* display_; |
40 bool alt_pressed_; | 39 bool alt_pressed_; |
41 bool ctrl_pressed_; | 40 bool ctrl_pressed_; |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorThread); | 42 DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorThread); |
44 }; | 43 }; |
45 | 44 |
46 } // namespace remoting | 45 } // namespace remoting |
47 | 46 |
48 #endif | 47 #endif // REMOTING_HOST_LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ |
OLD | NEW |