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