summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_service_win.cc
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 19:23:07 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 19:23:07 +0000
commitc2b374409956cdad6d90ae6913f02251b09d8280 (patch)
tree7b0d440a0685ff903a8bbe846ff57917b5731901 /remoting/host/host_service_win.cc
parent0ab8bf8880a7ede55591fefb0e1162dc1a6f33f0 (diff)
downloadchromium_src-c2b374409956cdad6d90ae6913f02251b09d8280.zip
chromium_src-c2b374409956cdad6d90ae6913f02251b09d8280.tar.gz
chromium_src-c2b374409956cdad6d90ae6913f02251b09d8280.tar.bz2
Chromoting: Implemented security attention sequence (SAS) emulation on Windows.
The default SAS is Ctrl+Alt+Delete. It can neither be intercepted by the client (at least on Windows) nor it can be injected the same way other key strokes are injected. This CL makes the Windows host to interpret a double Scroll Lock as a SAS and invoke the Chromoting service to issue the actual SAS. Review URL: http://codereview.chromium.org/9617027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/host_service_win.cc')
-rw-r--r--remoting/host/host_service_win.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/remoting/host/host_service_win.cc b/remoting/host/host_service_win.cc
index 66bfa09..a404e6e 100644
--- a/remoting/host/host_service_win.cc
+++ b/remoting/host/host_service_win.cc
@@ -20,6 +20,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
+#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h"
@@ -45,6 +46,8 @@ const DWORD kServiceStopTimeoutMs = 30 * 1000;
// Session id that does not represent any session.
const uint32 kInvalidSession = 0xffffffff;
+const char kIoThreadName[] = "I/O thread";
+
// A window class for the session change notifications window.
static const char kSessionNotificationWindowClass[] =
"Chromoting_SessionNotificationWindow";
@@ -351,7 +354,16 @@ int HostService::Run() {
}
void HostService::RunMessageLoop() {
- WtsSessionProcessLauncher launcher(this, host_binary_);
+ // Launch the I/O thread.
+ base::Thread io_thread(kIoThreadName);
+ base::Thread::Options io_thread_options(MessageLoop::TYPE_IO, 0);
+ if (!io_thread.StartWithOptions(io_thread_options)) {
+ shutting_down_ = true;
+ stopped_event_.Signal();
+ return;
+ }
+
+ WtsSessionProcessLauncher launcher(this, host_binary_, &io_thread);
// Run the service.
message_loop_->Run();