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 #ifndef REMOTING_LOCAL_INPUT_MONITOR_H_ | 5 #ifndef REMOTING_HOST_LOCAL_INPUT_MONITOR_H_ |
6 #define REMOTING_LOCAL_INPUT_MONITOR_H_ | 6 #define REMOTING_HOST_LOCAL_INPUT_MONITOR_H_ |
| 7 #pragma once |
7 | 8 |
8 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 | 13 |
13 class MouseMoveObserver; | 14 class MouseMoveObserver; |
14 | 15 |
15 class LocalInputMonitor { | 16 class LocalInputMonitor { |
16 public: | 17 public: |
17 virtual ~LocalInputMonitor() {} | 18 virtual ~LocalInputMonitor() {} |
18 | 19 |
19 // Starts local input monitoring. This class is also responsible for | 20 // Starts local input monitoring. This class is also responsible for |
20 // of catching the disconnection keyboard shortcut on Mac and Linux | 21 // of catching the disconnection keyboard shortcut on Mac and Linux |
21 // (Ctlr-Alt-Esc). The |disconnect_callback| is called when this key | 22 // (Ctlr-Alt-Esc). The |disconnect_callback| is called when this key |
22 // combination is pressed. | 23 // combination is pressed. |
23 // | 24 // |
24 // TODO(sergeyu): Refactor shortcut code to a separate class. | 25 // TODO(sergeyu): Refactor shortcut code to a separate class. |
25 virtual void Start(MouseMoveObserver* mouse_move_observer, | 26 virtual void Start(MouseMoveObserver* mouse_move_observer, |
26 const base::Closure& disconnect_callback) = 0; | 27 const base::Closure& disconnect_callback) = 0; |
27 virtual void Stop() = 0; | 28 virtual void Stop() = 0; |
28 | 29 |
29 static scoped_ptr<LocalInputMonitor> Create(); | 30 static scoped_ptr<LocalInputMonitor> Create(); |
30 }; | 31 }; |
31 | 32 |
32 } // namespace remoting | 33 } // namespace remoting |
33 | 34 |
34 #endif | 35 #endif // REMOTING_HOST_LOCAL_INPUT_MONITOR_H_ |
OLD | NEW |