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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_input_handler.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #if defined(OS_NACL) 10 #if defined(OS_NACL)
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 if (data.HasKey("capabilities")) { 636 if (data.HasKey("capabilities")) {
637 if (!data.GetString("capabilities", &capabilities)) { 637 if (!data.GetString("capabilities", &capabilities)) {
638 LOG(ERROR) << "Invalid connect() data."; 638 LOG(ERROR) << "Invalid connect() data.";
639 return; 639 return;
640 } 640 }
641 } 641 }
642 642
643 VLOG(0) << "Connecting to " << host_jid 643 VLOG(0) << "Connecting to " << host_jid
644 << ". Local jid: " << local_jid << "."; 644 << ". Local jid: " << local_jid << ".";
645 645
646 std::string key_filter;
646 #if defined(OS_NACL) 647 #if defined(OS_NACL)
647 std::string key_filter;
648 if (!data.GetString("keyFilter", &key_filter)) { 648 if (!data.GetString("keyFilter", &key_filter)) {
649 NOTREACHED(); 649 NOTREACHED();
650 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); 650 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
651 } else if (key_filter == "mac") { 651 } else if (key_filter == "mac") {
652 normalizing_input_filter_.reset( 652 normalizing_input_filter_.reset(
653 new NormalizingInputFilterMac(&key_mapper_)); 653 new NormalizingInputFilterMac(&key_mapper_));
654 } else if (key_filter == "cros") { 654 } else if (key_filter == "cros") {
655 normalizing_input_filter_.reset( 655 normalizing_input_filter_.reset(
656 new NormalizingInputFilterCros(&key_mapper_)); 656 new NormalizingInputFilterCros(&key_mapper_));
657 } else { 657 } else {
658 DCHECK(key_filter.empty()); 658 DCHECK(key_filter.empty());
659 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); 659 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
660 } 660 }
661 #elif defined(OS_MACOSX) 661 #elif defined(OS_MACOSX)
662 normalizing_input_filter_.reset(new NormalizingInputFilterMac(&key_mapper_)); 662 normalizing_input_filter_.reset(new NormalizingInputFilterMac(&key_mapper_));
663 #elif defined(OS_CHROMEOS) 663 #elif defined(OS_CHROMEOS)
664 key_filter = "cros";
664 normalizing_input_filter_.reset(new NormalizingInputFilterCros(&key_mapper_)); 665 normalizing_input_filter_.reset(new NormalizingInputFilterCros(&key_mapper_));
665 #else 666 #else
666 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); 667 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
667 #endif 668 #endif
668 input_handler_.set_input_stub(normalizing_input_filter_.get()); 669 input_handler_.set_input_stub(normalizing_input_filter_.get());
669 670
671 // Enable stuck modifier key detection on platforms other than ChromeOS.
672 // ChromeOS doesn't set modifier flags for "rewritten" keyboard events
673 // such as Alt+Backspace, which causes ReleaseAllIfModifiersStuck to
674 // incorrectly release all keys, so don't enable it on that platform.
675 input_handler_.set_detect_stuck_modifiers(key_filter != "cros");
676
670 // PPB_VideoDecoder is not always enabled because it's broken in some versions 677 // PPB_VideoDecoder is not always enabled because it's broken in some versions
671 // of Chrome. See crbug.com/447403 . 678 // of Chrome. See crbug.com/447403 .
672 bool enable_video_decode_renderer = false; 679 bool enable_video_decode_renderer = false;
673 if (data.GetBoolean("enableVideoDecodeRenderer", 680 if (data.GetBoolean("enableVideoDecodeRenderer",
674 &enable_video_decode_renderer) && 681 &enable_video_decode_renderer) &&
675 enable_video_decode_renderer) { 682 enable_video_decode_renderer) {
676 LogToWebapp("Initializing 3D renderer."); 683 LogToWebapp("Initializing 3D renderer.");
677 video_renderer_.reset(new PepperVideoRenderer3D()); 684 video_renderer_.reset(new PepperVideoRenderer3D());
678 if (!video_renderer_->Initialize(this, context_, this)) 685 if (!video_renderer_->Initialize(this, context_, this))
679 video_renderer_.reset(); 686 video_renderer_.reset();
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1197
1191 #if !defined(OS_NACL) 1198 #if !defined(OS_NACL)
1192 // Log messages are forwarded to the webapp only in PNaCl version of the 1199 // Log messages are forwarded to the webapp only in PNaCl version of the
1193 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl 1200 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl
1194 // version. 1201 // version.
1195 ProcessLogToUI(message); 1202 ProcessLogToUI(message);
1196 #endif // !defined(OS_NACL) 1203 #endif // !defined(OS_NACL)
1197 } 1204 }
1198 1205
1199 } // namespace remoting 1206 } // namespace remoting
OLDNEW
« 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