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

Unified Diff: chrome/browser/ui/views/aura/caps_lock_handler.cc

Issue 9129016: Ignore Shift+Search when spoken feedback is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/aura/caps_lock_handler.cc
diff --git a/chrome/browser/ui/views/aura/caps_lock_handler.cc b/chrome/browser/ui/views/aura/caps_lock_handler.cc
index fccd62b6ec656595eb3ab37240100e1fc7be3ec1..7b49f6515e153001f5a04279809f3becbb64fdf6 100644
--- a/chrome/browser/ui/views/aura/caps_lock_handler.cc
+++ b/chrome/browser/ui/views/aura/caps_lock_handler.cc
@@ -8,8 +8,11 @@
// TODO(yusukes): Support Ash on Windows.
#if defined(OS_CHROMEOS)
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/input_method/xkeyboard.h"
#include "chrome/browser/chromeos/system/runtime_environment.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/common/pref_names.h"
#endif
#if defined(OS_CHROMEOS)
@@ -40,9 +43,11 @@ CapsLockHandler::~CapsLockHandler() {
bool CapsLockHandler::HandleToggleCapsLock() {
#if defined(OS_CHROMEOS)
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- if (is_running_on_chromeos_) {
- // TODO(yusukes): Do not change Caps Lock status and just return false if
- // spoken feedback is enabled (crosbug.com/110127).
+ if (is_running_on_chromeos_ &&
+ // When spoken feedback is enabled, the Search key is used as an
+ // accessibility modifier key.
+ !g_browser_process->local_state()->GetBoolean(
+ prefs::kSpokenFeedbackEnabled)) {
xkeyboard_->SetCapsLockEnabled(!caps_lock_is_on_);
return true; // consume the shortcut key.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698