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 #include "remoting/host/local_input_monitor.h" | 5 #include "remoting/host/local_input_monitor.h" |
6 | 6 |
7 #include <sys/select.h> | 7 #include <sys/select.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 #define XK_MISCELLANY | 9 #define XK_MISCELLANY |
10 #include <X11/keysymdef.h> | 10 #include <X11/keysymdef.h> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void Stop(); | 55 void Stop(); |
56 | 56 |
57 private: | 57 private: |
58 friend class base::RefCountedThreadSafe<Core>; | 58 friend class base::RefCountedThreadSafe<Core>; |
59 virtual ~Core(); | 59 virtual ~Core(); |
60 | 60 |
61 void StartOnInputThread(); | 61 void StartOnInputThread(); |
62 void StopOnInputThread(); | 62 void StopOnInputThread(); |
63 | 63 |
64 // base::MessagePumpLibevent::Watcher interface. | 64 // base::MessagePumpLibevent::Watcher interface. |
65 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; | 65 virtual void OnFileCanReadWithoutBlocking(int fd) override; |
66 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; | 66 virtual void OnFileCanWriteWithoutBlocking(int fd) override; |
67 | 67 |
68 // Processes key and mouse events. | 68 // Processes key and mouse events. |
69 void ProcessXEvent(xEvent* event); | 69 void ProcessXEvent(xEvent* event); |
70 | 70 |
71 static void ProcessReply(XPointer self, XRecordInterceptData* data); | 71 static void ProcessReply(XPointer self, XRecordInterceptData* data); |
72 | 72 |
73 // Task runner on which public methods of this class must be called. | 73 // Task runner on which public methods of this class must be called. |
74 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; |
75 | 75 |
76 // Task runner on which X Window events are received. | 76 // Task runner on which X Window events are received. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( | 320 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( |
321 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 321 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
322 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 322 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
323 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 323 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
324 base::WeakPtr<ClientSessionControl> client_session_control) { | 324 base::WeakPtr<ClientSessionControl> client_session_control) { |
325 return make_scoped_ptr(new LocalInputMonitorLinux( | 325 return make_scoped_ptr(new LocalInputMonitorLinux( |
326 caller_task_runner, input_task_runner, client_session_control)); | 326 caller_task_runner, input_task_runner, client_session_control)); |
327 } | 327 } |
328 | 328 |
329 } // namespace remoting | 329 } // namespace remoting |
OLD | NEW |