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

Side by Side Diff: remoting/host/local_input_monitor_thread_linux.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « remoting/host/local_input_monitor_mac.mm ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_thread_linux.h" 5 #include "remoting/host/local_input_monitor_thread_linux.h"
6 6
7 #include <sys/select.h> 7 #include <sys/select.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #define XK_MISCELLANY 9 #define XK_MISCELLANY
10 #include <X11/keysymdef.h> 10 #include <X11/keysymdef.h>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 host_->LocalMouseMoved(pos); 166 host_->LocalMouseMoved(pos);
167 } 167 }
168 168
169 void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) { 169 void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) {
170 int key_sym = XKeycodeToKeysym(display_, key_code, 0); 170 int key_sym = XKeycodeToKeysym(display_, key_code, 0);
171 if (key_sym == XK_Control_L || key_sym == XK_Control_R) { 171 if (key_sym == XK_Control_L || key_sym == XK_Control_R) {
172 ctrl_pressed_ = down; 172 ctrl_pressed_ = down;
173 } else if (key_sym == XK_Alt_L || key_sym == XK_Alt_R) { 173 } else if (key_sym == XK_Alt_L || key_sym == XK_Alt_R) {
174 alt_pressed_ = down; 174 alt_pressed_ = down;
175 } else if (alt_pressed_ && ctrl_pressed_ && key_sym == XK_Escape && down) { 175 } else if (alt_pressed_ && ctrl_pressed_ && key_sym == XK_Escape && down) {
176 host_->Shutdown(NULL); 176 host_->Shutdown(base::Closure());
177 } 177 }
178 } 178 }
179 179
180 } // namespace remoting 180 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_mac.mm ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698