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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11113004: Do not consume keys for DISABLE_CAPS_LOCK when caps lock is off. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 8 years, 2 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 | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 8a7b4cfa32a6440833a946db0770023d00d1a7d5..089c1a647146aae8ef0c5b1da3f29c0e4e9b080a 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -556,9 +556,11 @@ bool AcceleratorController::PerformAction(int action,
// We totally ignore this accelerator.
return false;
}
- if (shell->caps_lock_delegate()->IsCapsLockEnabled())
+ if (shell->caps_lock_delegate()->IsCapsLockEnabled()) {
shell->caps_lock_delegate()->SetCapsLockEnabled(false);
- return true;
+ return true;
+ }
+ return false;
case TOGGLE_CAPS_LOCK:
shell->caps_lock_delegate()->ToggleCapsLock();
return true;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698