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

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

Issue 11346028: Allow Caps Lock to be remapped [part 2 of 2] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix 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/webui/options/chromeos/keyboard_handler.h ('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 08b0ede6c7998a41ee41e06855f4eb667d4d1a93..8d59859175ced16aec3d71f0e333fd30a655e05a 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -4,8 +4,11 @@
#include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h"
+#include "base/command_line.h"
#include "base/values.h"
#include "chrome/browser/chromeos/input_method/xkeyboard.h"
+#include "chrome/common/chrome_switches.h"
+#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -83,5 +86,14 @@ void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
}
}
+void KeyboardHandler::InitializePage() {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kHasChromeOSKeyboard))
+ return;
+ const base::FundamentalValue show_options(true);
+ web_ui()->CallJavascriptFunction(
+ "options.KeyboardOverlay.showCapsLockOptions", show_options);
+}
+
} // namespace options
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/keyboard_handler.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698