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

Unified Diff: remoting/host/local_input_monitor_thread_linux.cc

Issue 10447041: Fix Ctrl+Alt+Esc keyboard shortcut in Me2Me host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/local_input_monitor_thread_linux.h ('k') | remoting/host/local_input_monitor_thread_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_thread_linux.cc
diff --git a/remoting/host/local_input_monitor_thread_linux.cc b/remoting/host/local_input_monitor_thread_linux.cc
index 1adb05498617a56f17ade25a1b4f7decf3aa2cf7..86932cc171df63bbb1e44b6facc10236e18f3cde 100644
--- a/remoting/host/local_input_monitor_thread_linux.cc
+++ b/remoting/host/local_input_monitor_thread_linux.cc
@@ -10,8 +10,11 @@
#include <X11/keysymdef.h>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/eintr_wrapper.h"
-#include "remoting/host/chromoting_host.h"
+#include "base/logging.h"
+#include "remoting/host/mouse_move_observer.h"
+#include "third_party/skia/include/core/SkPoint.h"
// These includes need to be later than dictated by the style guide due to
// Xlib header pollution, specifically the min, max, and Status macros.
@@ -62,9 +65,15 @@ static void ProcessReply(XPointer thread,
XRecordFreeData(data);
}
-LocalInputMonitorThread::LocalInputMonitorThread(ChromotingHost* host)
+LocalInputMonitorThread::LocalInputMonitorThread(
+ MouseMoveObserver* mouse_move_observer,
+ const base::Closure& disconnect_callback)
: base::SimpleThread("LocalInputMonitor"),
- host_(host), display_(NULL), alt_pressed_(false), ctrl_pressed_(false) {
+ mouse_move_observer_(mouse_move_observer),
+ disconnect_callback_(disconnect_callback),
+ display_(NULL),
+ alt_pressed_(false),
+ ctrl_pressed_(false) {
wakeup_pipe_[0] = -1;
wakeup_pipe_[1] = -1;
CHECK_EQ(pipe(wakeup_pipe_), 0);
@@ -164,7 +173,7 @@ void LocalInputMonitorThread::Run() {
}
void LocalInputMonitorThread::LocalMouseMoved(const SkIPoint& pos) {
- host_->LocalMouseMoved(pos);
+ mouse_move_observer_->OnLocalMouseMoved(pos);
}
void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) {
@@ -174,7 +183,7 @@ void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) {
} else if (key_sym == XK_Alt_L || key_sym == XK_Alt_R) {
alt_pressed_ = down;
} else if (alt_pressed_ && ctrl_pressed_ && key_sym == XK_Escape && down) {
- host_->Shutdown(base::Closure());
+ disconnect_callback_.Run();
}
}
« no previous file with comments | « remoting/host/local_input_monitor_thread_linux.h ('k') | remoting/host/local_input_monitor_thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698