Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1539)

Unified Diff: remoting/host/local_input_monitor.h

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/ipc_desktop_environment_unittest.cc ('k') | remoting/host/local_input_monitor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..57ec051828bc8dc1383ab9582e625dceeae7c0bb 100644
--- a/remoting/host/local_input_monitor.h
+++ b/remoting/host/local_input_monitor.h
@@ -5,9 +5,9 @@
#ifndef REMOTING_HOST_LOCAL_INPUT_MONITOR_H_
#define REMOTING_HOST_LOCAL_INPUT_MONITOR_H_
-#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
namespace base {
class SingleThreadTaskRunner;
@@ -15,26 +15,28 @@ class SingleThreadTaskRunner;
namespace remoting {
-class MouseMoveObserver;
+class ClientSessionControl;
+// Monitors the local input to notify about mouse movements. On Mac and Linux
+// catches the disconnection keyboard shortcut (Ctlr-Alt-Esc) and invokes
+// SessionController::Delegate::DisconnectSession() when this key combination is
+// pressed.
+//
+// TODO(sergeyu): Refactor shortcut code to a separate class.
class LocalInputMonitor {
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.
+ // |client_session_control| is called on the |caller_task_runner| thread.
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,
+ base::WeakPtr<ClientSessionControl> client_session_control);
+
+ protected:
+ LocalInputMonitor() {}
};
} // namespace remoting
« no previous file with comments | « remoting/host/ipc_desktop_environment_unittest.cc ('k') | remoting/host/local_input_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698