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