summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 18:34:36 +0000
committernona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 18:34:36 +0000
commit4b8e2505874f005a2d4fd9ef3fb4b84e43b38275 (patch)
treebb5f0bf40e72d3d85be38645e1143136792acc10
parent4735cc369b943734227fd379c4b8a3b2bf48ff46 (diff)
downloadchromium_src-4b8e2505874f005a2d4fd9ef3fb4b84e43b38275.zip
chromium_src-4b8e2505874f005a2d4fd9ef3fb4b84e43b38275.tar.gz
chromium_src-4b8e2505874f005a2d4fd9ef3fb4b84e43b38275.tar.bz2
Introduce StickyKeys settings item with behind flag.
I'd like to introduce sticky keys items into accessibility group. BUG=229042 TEST=None Review URL: https://chromiumcodereview.appspot.com/16535004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213174 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chromeos_strings.grdp3
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc7
-rw-r--r--chrome/browser/resources/options/browser_options.html16
-rw-r--r--chrome/browser/resources/options/browser_options.js2
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc6
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
8 files changed, 44 insertions, 0 deletions
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp
index 59b4955..dd1c680 100644
--- a/chrome/app/chromeos_strings.grdp
+++ b/chrome/app/chromeos_strings.grdp
@@ -936,6 +936,9 @@ Press any key to continue exploring.
<message name="IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SHOULD_ALWAYS_SHOW_MENU" desc="In the settings tab, the text next to the checkbox to show the accessibility tray menu regardless of the state of a11y features.">
Show accessibility options in the system menu
</message>
+ <message name="IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION" desc="Inthe settings tab, the text next to the checkbox for the sticky keys.">
+ Enable sticky keys (to perform keyboard shortcuts by typing them sequentially)
+ </message>
<message name="IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_BUTTON_LABEL" desc="Label for the button opening display settings tab.">
Display settings
</message>
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 346281c..4d0f233 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7196,6 +7196,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION" desc="Description for the flag to switch lock animations.">
Disables new lock animations.
</message>
+ <message name="IDS_FLAGS_ENABLE_STICKY_KEYS_NAME" desc="Name for the flag to enable sticky keys.">
+ Enable sticky keys.
+ </message>
+ <message name="IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION" desc="Description for the flag to enable sticky keys.">
+ StickyKeys allows the user to press and release a modifier key, such as Shift, Ctrl, or Alt, and have it remain active until any other key is pressed.
+ </message>
</if>
<message name="IDS_FLAGS_FULL_HISTORY_SYNC_NAME" desc="Name of the flag to disable full history sync.">
Disable full history sync
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 2a913d1..ca66678e 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1585,6 +1585,13 @@ const Experiment kExperiments[] = {
kOsCrOS,
SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
},
+ {
+ "enable-sticky-keys",
+ IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
+ IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
+ kOsCrOS,
+ SINGLE_VALUE_TYPE(switches::kEnableStickyKeys),
+ },
#endif
{
"enable-translate-settings",
diff --git a/chrome/browser/resources/options/browser_options.html b/chrome/browser/resources/options/browser_options.html
index ef02f53..97dacf6 100644
--- a/chrome/browser/resources/options/browser_options.html
+++ b/chrome/browser/resources/options/browser_options.html
@@ -642,6 +642,22 @@
</span>
</div>
</div>
+ <div id="accessibility-sticky-keys" class="option-name" hidden>
+ <div class="checkbox">
+ <span class="controlled-setting-with-label">
+ <input id="accessibility-sticky-keys-check"
+ pref="settings.a11y.sticky_keys_enabled" type="checkbox">
+ <span>
+ <label for="accessibility-sticky-keys-check"
+ i18n-content="accessibilityStickyKeys">
+ </label>
+ <span class="controlled-setting-indicator"
+ pref="settings.a11y.sticky_keys_enabled">
+ </span>
+ </span>
+ </span>
+ </div>
+ </div>
<div class="option-name">
<div class="checkbox">
<span class="controlled-setting-with-label">
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index f221e88..f14ae61 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -430,6 +430,8 @@ cr.define('options', function() {
chrome.send('highContrastChange',
[$('accessibility-high-contrast-check').checked]);
};
+ $('accessibility-sticky-keys').hidden =
+ !loadTimeData.getBoolean('enableStickyKeys');
}
// Display management section (CrOS only).
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 5152da9..800b984 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -360,6 +360,8 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL },
{ "accessibilityLargeCursor",
IDS_OPTIONS_SETTINGS_ACCESSIBILITY_LARGE_CURSOR_DESCRIPTION },
+ { "accessibilityStickyKeys",
+ IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION },
{ "accessibilitySpokenFeedback",
IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SPOKEN_FEEDBACK_DESCRIPTION },
{ "accessibilityTitle",
@@ -500,6 +502,10 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
magnifier_list->Append(option_partial.release());
values->Set("magnifierList", magnifier_list.release());
+
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ values->SetBoolean("enableStickyKeys",
+ command_line.HasSwitch(switches::kEnableStickyKeys));
#endif
#if defined(OS_MACOSX)
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 81b7dbb..e9c67c56 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -663,6 +663,9 @@ const char kEnableSavePasswordBubble[] = "enable-save-password-bubble";
// supported server-side for searches on google.com.
const char kEnableSdch[] = "enable-sdch";
+// Enables support of sticky keys.
+const char kEnableStickyKeys[] = "enable-sticky-keys";
+
// Disable SPDY/3.1. This is a temporary testing flag.
const char kDisableSpdy31[] = "disable-spdy31";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 7ae2b4d..89faf47 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -189,6 +189,7 @@ extern const char kEnableResetProfileSettings[];
extern const char kEnableResourceContentSettings[];
extern const char kEnableSavePasswordBubble[];
extern const char kEnableSdch[];
+extern const char kEnableStickyKeys[];
extern const char kDisableSpdy31[];
extern const char kEnableSpdy4a2[];
extern const char kEnableSpdyCredentialFrames[];