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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1145863002: Disable stuck key detection on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase & fix compilation errors. Created 5 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 | « no previous file | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index a3544aa9fcbbbd5c0942a44d58875e7a3ca13983..13e36ee4d45bbf88b3d0207690a62434e4fc194b 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -643,8 +643,8 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) {
VLOG(0) << "Connecting to " << host_jid
<< ". Local jid: " << local_jid << ".";
-#if defined(OS_NACL)
std::string key_filter;
+#if defined(OS_NACL)
if (!data.GetString("keyFilter", &key_filter)) {
NOTREACHED();
normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
@@ -661,12 +661,19 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) {
#elif defined(OS_MACOSX)
normalizing_input_filter_.reset(new NormalizingInputFilterMac(&key_mapper_));
#elif defined(OS_CHROMEOS)
+ key_filter = "cros";
normalizing_input_filter_.reset(new NormalizingInputFilterCros(&key_mapper_));
#else
normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
#endif
input_handler_.set_input_stub(normalizing_input_filter_.get());
+ // Enable stuck modifier key detection on platforms other than ChromeOS.
+ // ChromeOS doesn't set modifier flags for "rewritten" keyboard events
+ // such as Alt+Backspace, which causes ReleaseAllIfModifiersStuck to
+ // incorrectly release all keys, so don't enable it on that platform.
+ input_handler_.set_detect_stuck_modifiers(key_filter != "cros");
+
// PPB_VideoDecoder is not always enabled because it's broken in some versions
// of Chrome. See crbug.com/447403 .
bool enable_video_decode_renderer = false;
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698