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

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

Issue 10837331: Options: s/options2/options/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wut Created 8 years, 4 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
Index: chrome/browser/ui/webui/options2/chromeos/keyboard_handler.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/keyboard_handler.cc b/chrome/browser/ui/webui/options2/chromeos/keyboard_handler.cc
deleted file mode 100644
index 8640f69484d25154c6ed8b5cbb342ef35bd09db8..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/options2/chromeos/keyboard_handler.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/options2/chromeos/keyboard_handler.h"
-
-#include "base/values.h"
-#include "chrome/browser/chromeos/input_method/xkeyboard.h"
-#include "grit/generated_resources.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace {
-const struct ModifierKeysSelectItem {
- int message_id;
- chromeos::input_method::ModifierKey value;
-} kModifierKeysSelectItems[] = {
- { IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_SEARCH,
- chromeos::input_method::kSearchKey },
- { IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_LEFT_CTRL,
- chromeos::input_method::kControlKey },
- { IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_LEFT_ALT,
- chromeos::input_method::kAltKey },
- { IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_VOID,
- chromeos::input_method::kVoidKey },
- { IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_CAPS_LOCK,
- chromeos::input_method::kCapsLockKey },
-};
-
-const char* kDataValuesNames[] = {
- "xkbRemapSearchKeyToValue",
- "xkbRemapControlKeyToValue",
- "xkbRemapAltKeyToValue",
-};
-} // namespace
-
-namespace chromeos {
-namespace options {
-
-KeyboardHandler::KeyboardHandler() {
-}
-
-KeyboardHandler::~KeyboardHandler() {
-}
-
-void KeyboardHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
- DCHECK(localized_strings);
-
- localized_strings->SetString("keyboardOverlayTitle",
- l10n_util::GetStringUTF16(IDS_OPTIONS_KEYBOARD_OVERLAY_TITLE));
- localized_strings->SetString("xkbRemapSearchKeyToContent",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_SEARCH_LABEL));
- localized_strings->SetString("xkbRemapControlKeyToContent",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_LEFT_CTRL_LABEL));
- localized_strings->SetString("xkbRemapAltKeyToContent",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_LEFT_ALT_LABEL));
-
- for (size_t i = 0; i < arraysize(kDataValuesNames); ++i) {
- ListValue* list_value = new ListValue();
- for (size_t j = 0; j < arraysize(kModifierKeysSelectItems); ++j) {
- const input_method::ModifierKey value =
- kModifierKeysSelectItems[j].value;
- const int message_id = kModifierKeysSelectItems[j].message_id;
- // Only the seach key can be remapped to the caps lock key.
- if (kDataValuesNames[i] != std::string("xkbRemapSearchKeyToValue") &&
- value == input_method::kCapsLockKey) {
- continue;
- }
- ListValue* option = new ListValue();
- option->Append(Value::CreateIntegerValue(value));
- option->Append(Value::CreateStringValue(l10n_util::GetStringUTF16(
- message_id)));
- list_value->Append(option);
- }
- localized_strings->Set(kDataValuesNames[i], list_value);
- }
-}
-
-} // namespace options
-} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698