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 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/mac/scoped_cftyperef.h" | 14 #include "base/mac/scoped_cftyperef.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
19 #include "remoting/host/client_session_control.h" | 19 #include "remoting/host/client_session_control.h" |
20 #import "third_party/GTM/AppKit/GTMCarbonEvent.h" | 20 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMCarbonEvent.h" |
21 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 21 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
22 | 22 |
23 // Esc Key Code is 53. | 23 // Esc Key Code is 53. |
24 // http://boredzo.org/blog/wp-content/uploads/2007/05/IMTx-virtual-keycodes.pdf | 24 // http://boredzo.org/blog/wp-content/uploads/2007/05/IMTx-virtual-keycodes.pdf |
25 static const NSUInteger kEscKeyCode = 53; | 25 static const NSUInteger kEscKeyCode = 53; |
26 | 26 |
27 namespace remoting { | 27 namespace remoting { |
28 namespace { | 28 namespace { |
29 | 29 |
30 class LocalInputMonitorMac : public base::NonThreadSafe, | 30 class LocalInputMonitorMac : public base::NonThreadSafe, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 270 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
271 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 271 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
272 base::WeakPtr<ClientSessionControl> client_session_control) { | 272 base::WeakPtr<ClientSessionControl> client_session_control) { |
273 return scoped_ptr<LocalInputMonitor>( | 273 return scoped_ptr<LocalInputMonitor>( |
274 new LocalInputMonitorMac(caller_task_runner, | 274 new LocalInputMonitorMac(caller_task_runner, |
275 ui_task_runner, | 275 ui_task_runner, |
276 client_session_control)); | 276 client_session_control)); |
277 } | 277 } |
278 | 278 |
279 } // namespace remoting | 279 } // namespace remoting |
OLD | NEW |