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

Unified Diff: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc

Issue 11943009: Add diamond-key remapping support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | « chrome/browser/ui/ash/event_rewriter_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
index 18dec626d1c0ac7e9337569b86ce157c1322f8bb..6ceb0c3d015b2e179b4f85ff54cf3dafe479a491 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -34,6 +34,7 @@ const char* kDataValuesNames[] = {
"remapControlKeyToValue",
"remapAltKeyToValue",
"remapCapsLockKeyToValue",
+ "remapDiamondKeyToValue",
};
} // namespace
@@ -63,6 +64,9 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
localized_strings->SetString("remapCapsLockKeyToContent",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_CAPS_LOCK_LABEL));
+ localized_strings->SetString("remapDiamondKeyToContent",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_DIAMOND_KEY_LABEL));
localized_strings->SetString("changeLanguageAndInputSettings",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_CHANGE_LANGUAGE_AND_INPUT_SETTINGS));
@@ -92,13 +96,18 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
void KeyboardHandler::InitializePage() {
bool chromeos_keyboard = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kHasChromeOSKeyboard);
+ const base::FundamentalValue show_caps_lock_options(chromeos_keyboard);
- const base::FundamentalValue show_options(true);
+ bool has_diamond_key = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kHasChromeOSDiamondKey);
+ const base::FundamentalValue show_diamond_key_options(has_diamond_key);
- if (!chromeos_keyboard) {
- web_ui()->CallJavascriptFunction(
- "options.KeyboardOverlay.showCapsLockOptions", show_options);
- }
+ web_ui()->CallJavascriptFunction(
+ "options.KeyboardOverlay.showCapsLockOptions",
+ show_caps_lock_options);
+ web_ui()->CallJavascriptFunction(
+ "options.KeyboardOverlay.showDiamondKeyOptions",
+ show_diamond_key_options);
}
} // namespace options
« no previous file with comments | « chrome/browser/ui/ash/event_rewriter_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698