| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
| 14 #include "base/win/message_window.h" | 14 #include "base/win/message_window.h" |
| 15 #include "remoting/host/client_session_control.h" | 15 #include "remoting/host/client_session_control.h" |
| 16 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 16 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| 17 | 17 |
| 18 namespace remoting { | 18 namespace remoting { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const wchar_t kWindowClassFormat[] = L"Chromoting_LocalInputMonitorWin_%p"; | |
| 23 | |
| 24 // From the HID Usage Tables specification. | 22 // From the HID Usage Tables specification. |
| 25 const USHORT kGenericDesktopPage = 1; | 23 const USHORT kGenericDesktopPage = 1; |
| 26 const USHORT kMouseUsage = 2; | 24 const USHORT kMouseUsage = 2; |
| 27 | 25 |
| 28 class LocalInputMonitorWin : public base::NonThreadSafe, | 26 class LocalInputMonitorWin : public base::NonThreadSafe, |
| 29 public LocalInputMonitor { | 27 public LocalInputMonitor { |
| 30 public: | 28 public: |
| 31 LocalInputMonitorWin( | 29 LocalInputMonitorWin( |
| 32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( | 235 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( |
| 238 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 236 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 239 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 237 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| 240 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 238 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 241 base::WeakPtr<ClientSessionControl> client_session_control) { | 239 base::WeakPtr<ClientSessionControl> client_session_control) { |
| 242 return make_scoped_ptr(new LocalInputMonitorWin( | 240 return make_scoped_ptr(new LocalInputMonitorWin( |
| 243 caller_task_runner, ui_task_runner, client_session_control)); | 241 caller_task_runner, ui_task_runner, client_session_control)); |
| 244 } | 242 } |
| 245 | 243 |
| 246 } // namespace remoting | 244 } // namespace remoting |
| OLD | NEW |