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

Unified Diff: ui/base/ime/input_method_chromeos.cc

Issue 2763483002: Fix Caps Lock bug (Closed)
Patch Set: Failure due to file directory change, apply the fix Created 3 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
Index: ui/base/ime/input_method_chromeos.cc
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index d867fb9905ffebb4000d35fd8e287d0741ce29d6..f1ed2f3f1fcecc41e0a12e4cc8078215f7ef2d03 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -63,20 +63,9 @@ void InputMethodChromeOS::DispatchKeyEvent(
DCHECK(event->IsKeyEvent());
DCHECK(!(event->flags() & ui::EF_IS_SYNTHESIZED));
- // For linux_chromeos, the ime keyboard cannot track the caps lock state by
- // itself, so need to call SetCapsLockEnabled() method to reflect the caps
- // lock state by the key event.
- if (!chromeos::IsRunningAsSystemCompositor()) {
- chromeos::input_method::InputMethodManager* manager =
- chromeos::input_method::InputMethodManager::Get();
- if (manager) {
- chromeos::input_method::ImeKeyboard* keyboard = manager->GetImeKeyboard();
- if (keyboard && event->type() == ui::ET_KEY_PRESSED) {
- keyboard->SetCapsLockEnabled((event->key_code() == ui::VKEY_CAPITAL) ?
- !keyboard->CapsLockIsEnabled() : event->IsCapsLockOn());
- }
- }
- }
+ // The Caps Lock toggling has been removed from here, because now it is
+ // handled in accelerator controller.
+ // (see https://bugs.chromium.org/p/chromium/issues/detail?id=700705).
// If |context_| is not usable, then we can only dispatch the key event as is.
// We only dispatch the key event to input method when the |context_| is an
« no previous file with comments | « chrome/browser/chromeos/events/event_rewriter_unittest.cc ('k') | ui/chromeos/events/event_rewriter_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698