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

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

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SkyNits Created 8 years, 1 month 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/chrome_switches.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 8d59859175ced16aec3d71f0e333fd30a655e05a..51e35f30452fa4cd90b84cacce681c235ccc03c8 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -63,6 +63,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("searchKeyActsAsFunctionKey",
+ l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_KEY_SEARCH_AS_FUNCTION));
for (size_t i = 0; i < arraysize(kDataValuesNames); ++i) {
ListValue* list_value = new ListValue();
@@ -87,12 +90,22 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
}
void KeyboardHandler::InitializePage() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kHasChromeOSKeyboard))
- return;
+ bool chromeos_keyboard = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kHasChromeOSKeyboard);
+ bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableChromebookFunctionKey);
+
const base::FundamentalValue show_options(true);
- web_ui()->CallJavascriptFunction(
- "options.KeyboardOverlay.showCapsLockOptions", show_options);
+
+ if (!chromeos_keyboard) {
+ web_ui()->CallJavascriptFunction(
+ "options.KeyboardOverlay.showCapsLockOptions", show_options);
+ }
+
+ if (chromebook_function_key) {
+ web_ui()->CallJavascriptFunction(
+ "options.KeyboardOverlay.showFunctionKeyOptions", show_options);
+ }
}
} // namespace options
« no previous file with comments | « chrome/browser/ui/ash/event_rewriter_unittest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698