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

Unified Diff: remoting/host/desktop_process.cc

Issue 1930473003: Adding support for Win+L key combo in Windows host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing CR feedback Created 4 years, 8 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/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_process.cc
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc
index e3ff18ceba7d485822b52a1d994e63f75434d826..5cec219bf4fc3859b6cc9ad99584bd997607751d 100644
--- a/remoting/host/desktop_process.cc
+++ b/remoting/host/desktop_process.cc
@@ -25,6 +25,10 @@
#include "remoting/host/desktop_environment.h"
#include "remoting/host/desktop_session_agent.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif // defined(OS_WIN)
+
namespace remoting {
DesktopProcess::DesktopProcess(
@@ -61,6 +65,22 @@ void DesktopProcess::InjectSas() {
daemon_channel_->Send(new ChromotingDesktopDaemonMsg_InjectSas());
}
+void DesktopProcess::LockWorkStation() {
+ DCHECK(caller_task_runner_->BelongsToCurrentThread());
+#if defined(OS_WIN)
+ if (base::win::OSInfo::GetInstance()->version_type() ==
+ base::win::VersionType::SUITE_HOME) {
+ return;
+ }
+
+ if (!::LockWorkStation()) {
+ LOG(ERROR) << "LockWorkStation() failed: " << ::GetLastError();
+ }
+#else
+ NOTREACHED();
+#endif // defined(OS_WIN)
+}
+
bool DesktopProcess::OnMessageReceived(const IPC::Message& message) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698