OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ |
6 #define LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ | 6 #define LOCAL_INPUT_MONITOR_THREAD_LINUX_H_ |
7 | 7 |
| 8 #include "base/compiler_specific.h" |
8 #include "base/threading/simple_thread.h" | 9 #include "base/threading/simple_thread.h" |
9 #include "third_party/skia/include/core/SkPoint.h" | 10 #include "third_party/skia/include/core/SkPoint.h" |
10 | 11 |
11 typedef struct _XDisplay Display; | 12 typedef struct _XDisplay Display; |
12 | 13 |
13 namespace remoting { | 14 namespace remoting { |
14 | 15 |
15 class ChromotingHost; | 16 class ChromotingHost; |
16 | 17 |
17 class LocalInputMonitorThread : public base::SimpleThread { | 18 class LocalInputMonitorThread : public base::SimpleThread { |
18 public: | 19 public: |
19 explicit LocalInputMonitorThread(ChromotingHost* host); | 20 explicit LocalInputMonitorThread(ChromotingHost* host); |
20 virtual ~LocalInputMonitorThread(); | 21 virtual ~LocalInputMonitorThread(); |
21 | 22 |
22 void Stop(); | 23 void Stop(); |
23 virtual void Run(); | 24 virtual void Run() OVERRIDE; |
24 | 25 |
25 void LocalMouseMoved(const SkIPoint& pos); | 26 void LocalMouseMoved(const SkIPoint& pos); |
26 void LocalKeyPressed(int key_code, bool down); | 27 void LocalKeyPressed(int key_code, bool down); |
27 | 28 |
28 private: | 29 private: |
29 ChromotingHost* host_; | 30 ChromotingHost* host_; |
30 int wakeup_pipe_[2]; | 31 int wakeup_pipe_[2]; |
31 Display* display_; | 32 Display* display_; |
32 bool alt_pressed_; | 33 bool alt_pressed_; |
33 bool ctrl_pressed_; | 34 bool ctrl_pressed_; |
34 | 35 |
35 DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorThread); | 36 DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorThread); |
36 }; | 37 }; |
37 | 38 |
38 } // namespace remoting | 39 } // namespace remoting |
39 | 40 |
40 #endif | 41 #endif |
OLD | NEW |