Chromium Code Reviews| Index: remoting/host/local_input_monitor.h |
| diff --git a/remoting/host/local_input_monitor.h b/remoting/host/local_input_monitor.h |
| index 29893d6d241c4467129037bb740987d756133395..240e258b20b83f151a96f2da157e95d6235358e1 100644 |
| --- a/remoting/host/local_input_monitor.h |
| +++ b/remoting/host/local_input_monitor.h |
| @@ -8,6 +8,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "remoting/host/session_controller.h" |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -15,26 +16,29 @@ class SingleThreadTaskRunner; |
| namespace remoting { |
| -class MouseMoveObserver; |
| - |
| -class LocalInputMonitor { |
| +// Monitors local input to notify about mouse movements. On Mac and Linux |
| +// catches the disconnection keyboard shortcut (Ctlr-Alt-Esc) and invokes |
| +// SessionController::EventHandler::Disconnect() this key combination is |
|
Sergey Ulanov
2013/03/20 06:31:06
s/this/when this/
alexeypa (please no reviews)
2013/03/20 17:05:29
Done.
|
| +// pressed. |
| +// |
| +// TODO(sergeyu): Refactor shortcut code to a separate class. |
| +class LocalInputMonitor : public SessionController { |
|
Sergey Ulanov
2013/03/20 06:31:06
This class doesn't add anything to SessionControll
alexeypa (please no reviews)
2013/03/20 17:05:29
It is needed so that ClientSession/DesktopSessionA
|
| public: |
| virtual ~LocalInputMonitor() {} |
| - // Starts local input monitoring. This class is also responsible for |
| - // of catching the disconnection keyboard shortcut on Mac and Linux |
| - // (Ctlr-Alt-Esc). The |disconnect_callback| is called when this key |
| - // combination is pressed. |
| - // |
| - // TODO(sergeyu): Refactor shortcut code to a separate class. |
| - virtual void Start(MouseMoveObserver* mouse_move_observer, |
| - const base::Closure& disconnect_callback) = 0; |
| - virtual void Stop() = 0; |
| - |
| + // Creates a platform-specific instance of LocalInputMonitor. |
| static scoped_ptr<LocalInputMonitor> Create( |
| scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| - scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
| + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| + SessionController::Delegate* delegate); |
| + |
| + protected: |
| + LocalInputMonitor() {} |
| + |
| + // SessionController interface. |
| + virtual void SetScreenResolution( |
| + const ScreenResolution& resolution) OVERRIDE {} |
| }; |
| } // namespace remoting |