summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:41:07 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 01:41:07 +0000
commit4743dadd60796ed4462c44ac4c8cc27673c8e6e6 (patch)
tree3a84bc5b8d1623176c257af0f4eb66f8d74a1a95 /chrome
parent81870ae8c94f96486435a11a490fa53e4dafb096 (diff)
downloadchromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.zip
chromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.tar.gz
chromium_src-4743dadd60796ed4462c44ac4c8cc27673c8e6e6.tar.bz2
Remove DOMUI and Views settings for key repeat rate and delay, change the default values instead.
BUG=chromium-os:5933 TEST=manually Review URL: http://codereview.chromium.org/3181035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd31
-rw-r--r--chrome/browser/chromeos/dom_ui/system_options_handler.cc36
-rw-r--r--chrome/browser/chromeos/language_preferences.cc13
-rw-r--r--chrome/browser/chromeos/language_preferences.h6
-rw-r--r--chrome/browser/chromeos/language_preferences_unittest.cc4
-rw-r--r--chrome/browser/chromeos/options/settings_page_view.cc16
-rw-r--r--chrome/browser/chromeos/options/settings_page_view.h2
-rw-r--r--chrome/browser/chromeos/options/system_page_view.cc104
-rw-r--r--chrome/browser/chromeos/preferences.cc14
-rw-r--r--chrome/browser/resources/options/chromeos_system_options.html42
-rw-r--r--chrome/browser/sync/glue/synchronized_preferences.h9
-rw-r--r--chrome/common/pref_names.cc8
12 files changed, 26 insertions, 259 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index b08c02e..7357852 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -8242,9 +8242,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE">
Language
</message>
- <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_KEYBOARD">
- Keyboard
- </message>
<message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY">
Accessibility
</message>
@@ -8895,34 +8892,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
desc="The label for 'Configure modifier keys' drop-down">
Swap Left Control and Left Alt keys
</message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_ENABLED"
- desc="The label for the Chrome OS configuration dialog">
- Repeat keys
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY"
- desc="The label for the Chrome OS configuration dialog">
- Key repeat delay:
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_SHORT"
- desc="The label for the Chrome OS configuration dialog">
- short
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_LONG"
- desc="The label for the Chrome OS configuration dialog">
- long
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED"
- desc="The label for the Chrome OS configuration dialog">
- Key repeat speed:
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_FAST"
- desc="The label for the Chrome OS configuration dialog">
- fast
- </message>
- <message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_SLOW"
- desc="The label for the Chrome OS configuration dialog">
- slow
- </message>
<message name="IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_MODIFIER_REMAP_SEARCH_CTRL"
desc="The label for 'Configure modifier keys' drop-down">
Swap Search and Left Control keys
diff --git a/chrome/browser/chromeos/dom_ui/system_options_handler.cc b/chrome/browser/chromeos/dom_ui/system_options_handler.cc
index 7a532c9..fd16921 100644
--- a/chrome/browser/chromeos/dom_ui/system_options_handler.cc
+++ b/chrome/browser/chromeos/dom_ui/system_options_handler.cc
@@ -61,42 +61,6 @@ void SystemOptionsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_MODIFIER_KEYS_CUSTOMIZE));
- localized_strings->SetString("keyboard",
- l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_SECTION_TITLE_KEYBOARD));
- localized_strings->SetString("repeat_keys",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_ENABLED));
- localized_strings->SetString("repeat_delay",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY));
- localized_strings->SetString("repeat_delay_short",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_SHORT));
- localized_strings->SetString("repeat_delay_long",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_LONG));
- localized_strings->SetString("repeat_delay_min",
- base::IntToString(
- chromeos::language_prefs::kXkbAutoRepeatDelayPref.min_pref_value));
- localized_strings->SetString("repeat_delay_max",
- base::IntToString(
- chromeos::language_prefs::kXkbAutoRepeatDelayPref.max_pref_value));
- localized_strings->SetString("repeat_speed",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED));
- localized_strings->SetString("repeat_speed_fast",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_FAST));
- localized_strings->SetString("repeat_speed_slow",
- l10n_util::GetStringUTF16(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_SLOW));
- localized_strings->SetString("repeat_speed_min",
- base::IntToString(
- chromeos::language_prefs::kXkbAutoRepeatIntervalPref.min_pref_value));
- localized_strings->SetString("repeat_speed_max",
- base::IntToString(
- chromeos::language_prefs::kXkbAutoRepeatIntervalPref.max_pref_value));
-
localized_strings->SetString("accessibility_title",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY));
diff --git a/chrome/browser/chromeos/language_preferences.cc b/chrome/browser/chromeos/language_preferences.cc
index 38c7ae7..b3f6f53 100644
--- a/chrome/browser/chromeos/language_preferences.cc
+++ b/chrome/browser/chromeos/language_preferences.cc
@@ -389,17 +389,8 @@ const LanguageMultipleChoicePreference<int> kXkbModifierMultipleChoicePrefs = {
0, // does not use the label.
};
-const LanguageIntegerRangePreference kXkbAutoRepeatDelayPref = {
- prefs::kLanguageXkbAutoRepeatDelay, 500, 100, 2000,
- NULL, // does not use the ibus configuration service.
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY,
-};
-const LanguageIntegerRangePreference kXkbAutoRepeatIntervalPref = {
- prefs::kLanguageXkbAutoRepeatInterval, 33, 9, 100,
- NULL, // does not use the ibus configuration service.
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED,
-};
-
+const int kXkbAutoRepeatDelayInMs = 500;
+const int kXkbAutoRepeatIntervalInMs = 50;
const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout";
const char kHardwareKeyboardLayout[] = "xkb:us::eng";
diff --git a/chrome/browser/chromeos/language_preferences.h b/chrome/browser/chromeos/language_preferences.h
index 69ca394..69a159b 100644
--- a/chrome/browser/chromeos/language_preferences.h
+++ b/chrome/browser/chromeos/language_preferences.h
@@ -152,8 +152,10 @@ enum RemapType {
extern const LanguageMultipleChoicePreference<int>
kXkbModifierMultipleChoicePrefs;
-extern const LanguageIntegerRangePreference kXkbAutoRepeatDelayPref;
-extern const LanguageIntegerRangePreference kXkbAutoRepeatIntervalPref;
+// A delay between the first and the start of the rest.
+extern const int kXkbAutoRepeatDelayInMs;
+// An interval between the repeated keys.
+extern const int kXkbAutoRepeatIntervalInMs;
// A string Chrome preference (Local State) of the preferred keyboard layout in
// the login screen.
diff --git a/chrome/browser/chromeos/language_preferences_unittest.cc b/chrome/browser/chromeos/language_preferences_unittest.cc
index bb9d21e..2383a28 100644
--- a/chrome/browser/chromeos/language_preferences_unittest.cc
+++ b/chrome/browser/chromeos/language_preferences_unittest.cc
@@ -132,10 +132,6 @@ TEST(LanguagePreferencesTest, TestDefaultValuesOfIntegerRangePrefs) {
kChewingIntegerPrefs, kNumChewingIntegerPrefs));
EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
kMozcIntegerPrefs, kNumMozcIntegerPrefs));
- EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
- &kXkbAutoRepeatDelayPref, 1));
- EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
- &kXkbAutoRepeatIntervalPref, 1));
}
} // namespace language_prefs
diff --git a/chrome/browser/chromeos/options/settings_page_view.cc b/chrome/browser/chromeos/options/settings_page_view.cc
index 6518cdf..84d9654 100644
--- a/chrome/browser/chromeos/options/settings_page_view.cc
+++ b/chrome/browser/chromeos/options/settings_page_view.cc
@@ -47,8 +47,7 @@ SettingsPageSection::SettingsPageSection(Profile* profile, int title_msg_id)
title_msg_id_(title_msg_id),
// Using 1000 so that it does not clash with ids defined in subclasses.
single_column_view_set_id_(1000),
- double_column_view_set_id_(1001),
- quad_column_view_set_id_(1003) {
+ double_column_view_set_id_(1001) {
}
void SettingsPageSection::InitControlLayout() {
@@ -91,19 +90,6 @@ void SettingsPageSection::InitControlLayout() {
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
- column_set = child_layout->AddColumnSet(quad_column_view_set_id_);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
- GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
-
InitContents(child_layout);
layout->AddView(contents);
}
diff --git a/chrome/browser/chromeos/options/settings_page_view.h b/chrome/browser/chromeos/options/settings_page_view.h
index 86d21e9..35e9934 100644
--- a/chrome/browser/chromeos/options/settings_page_view.h
+++ b/chrome/browser/chromeos/options/settings_page_view.h
@@ -49,7 +49,6 @@ class SettingsPageSection : public OptionsPageView {
int single_column_view_set_id() const { return single_column_view_set_id_; }
int double_column_view_set_id() const { return double_column_view_set_id_; }
- int quad_column_view_set_id() const { return quad_column_view_set_id_; }
private:
// The message id for the title of this section.
@@ -57,7 +56,6 @@ class SettingsPageSection : public OptionsPageView {
int single_column_view_set_id_;
int double_column_view_set_id_;
- int quad_column_view_set_id_;
DISALLOW_COPY_AND_ASSIGN(SettingsPageSection);
};
diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc
index ab3b346..6eb7497 100644
--- a/chrome/browser/chromeos/options/system_page_view.cc
+++ b/chrome/browser/chromeos/options/system_page_view.cc
@@ -357,8 +357,7 @@ void TouchpadSection::NotifyPrefChanged(const std::string* pref_name) {
// TextInput section for text input settings.
class LanguageSection : public SettingsPageSection,
public views::ButtonListener,
- public views::Combobox::Listener,
- public views::SliderListener {
+ public views::Combobox::Listener {
public:
explicit LanguageSection(Profile* profile);
virtual ~LanguageSection() {}
@@ -366,7 +365,6 @@ class LanguageSection : public SettingsPageSection,
private:
enum ButtonTag {
kCustomizeLanguagesButton,
- kEnableAutoRepeatButton,
};
// Overridden from SettingsPageSection:
virtual void InitContents(GridLayout* layout);
@@ -381,23 +379,12 @@ class LanguageSection : public SettingsPageSection,
int prev_index,
int new_index);
- // Overridden from views::SliderListener.
- virtual void SliderValueChanged(views::Slider* sender);
-
IntegerPrefMember xkb_remap_search_key_pref_;
IntegerPrefMember xkb_remap_control_key_pref_;
IntegerPrefMember xkb_remap_alt_key_pref_;
views::Combobox* xkb_modifier_combobox_;
chromeos::LanguageComboboxModel<int> xkb_modifier_combobox_model_;
- BooleanPrefMember xkb_auto_repeat_pref_;
- views::Checkbox* xkb_auto_repeat_checkbox_;
-
- IntegerPrefMember xkb_auto_repeat_delay_pref_;
- views::Slider* xkb_auto_repeat_delay_slider_;
- IntegerPrefMember xkb_auto_repeat_interval_pref_;
- views::Slider* xkb_auto_repeat_interval_slider_;
-
DISALLOW_COPY_AND_ASSIGN(LanguageSection);
};
@@ -406,23 +393,13 @@ LanguageSection::LanguageSection(Profile* profile)
IDS_OPTIONS_SETTINGS_SECTION_TITLE_LANGUAGE),
xkb_modifier_combobox_(NULL),
xkb_modifier_combobox_model_(
- &language_prefs::kXkbModifierMultipleChoicePrefs),
- xkb_auto_repeat_delay_slider_(NULL),
- xkb_auto_repeat_interval_slider_(NULL) {
+ &language_prefs::kXkbModifierMultipleChoicePrefs) {
xkb_remap_search_key_pref_.Init(
prefs::kLanguageXkbRemapSearchKeyTo, profile->GetPrefs(), this);
xkb_remap_control_key_pref_.Init(
prefs::kLanguageXkbRemapControlKeyTo, profile->GetPrefs(), this);
xkb_remap_alt_key_pref_.Init(
prefs::kLanguageXkbRemapAltKeyTo, profile->GetPrefs(), this);
- xkb_auto_repeat_pref_.Init(
- prefs::kLanguageXkbAutoRepeatEnabled, profile->GetPrefs(), this);
- xkb_auto_repeat_delay_pref_.Init(
- language_prefs::kXkbAutoRepeatDelayPref.pref_name,
- profile->GetPrefs(), this);
- xkb_auto_repeat_interval_pref_.Init(
- language_prefs::kXkbAutoRepeatIntervalPref.pref_name,
- profile->GetPrefs(), this);
}
void LanguageSection::InitContents(GridLayout* layout) {
@@ -436,26 +413,6 @@ void LanguageSection::InitContents(GridLayout* layout) {
xkb_modifier_combobox_ = new views::Combobox(&xkb_modifier_combobox_model_);
xkb_modifier_combobox_->set_listener(this);
- xkb_auto_repeat_checkbox_ = new views::Checkbox(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_ENABLED));
- xkb_auto_repeat_checkbox_->set_tag(kEnableAutoRepeatButton);
- xkb_auto_repeat_checkbox_->set_listener(this);
-
- xkb_auto_repeat_delay_slider_ = new views::Slider(
- language_prefs::kXkbAutoRepeatDelayPref.min_pref_value,
- language_prefs::kXkbAutoRepeatDelayPref.max_pref_value,
- 1,
- static_cast<views::Slider::StyleFlags>(
- views::Slider::STYLE_UPDATE_ON_RELEASE),
- this);
- xkb_auto_repeat_interval_slider_ = new views::Slider(
- language_prefs::kXkbAutoRepeatIntervalPref.min_pref_value,
- language_prefs::kXkbAutoRepeatIntervalPref.max_pref_value,
- 1,
- static_cast<views::Slider::StyleFlags>(
- views::Slider::STYLE_UPDATE_ON_RELEASE),
- this);
-
// Initialize the combobox to what's saved in user preferences. Otherwise,
// ItemChanged() will be called with |new_index| == 0.
NotifyPrefChanged(NULL);
@@ -463,38 +420,6 @@ void LanguageSection::InitContents(GridLayout* layout) {
layout->AddView(customize_languages_button, 1, 1,
GridLayout::LEADING, GridLayout::CENTER);
layout->AddView(xkb_modifier_combobox_);
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, single_column_view_set_id());
- layout->AddView(xkb_auto_repeat_checkbox_);
-
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, quad_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kXkbAutoRepeatDelayPref.message_id)),
- 1, 1, GridLayout::LEADING, GridLayout::CENTER);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_SHORT)));
- layout->AddView(xkb_auto_repeat_delay_slider_);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_DELAY_LONG)));
-
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- layout->StartRow(0, quad_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kXkbAutoRepeatIntervalPref.message_id)),
- 1, 1, GridLayout::LEADING, GridLayout::CENTER);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_FAST)));
- layout->AddView(xkb_auto_repeat_interval_slider_);
- layout->AddView(new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_KEY_REPEAT_SPEED_SLOW)));
-
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
}
@@ -502,9 +427,6 @@ void LanguageSection::ButtonPressed(
views::Button* sender, const views::Event& event) {
if (sender->tag() == kCustomizeLanguagesButton) {
LanguageConfigView::Show(profile(), GetOptionsViewParent());
- } else if (sender->tag() == kEnableAutoRepeatButton) {
- const bool enabled = xkb_auto_repeat_checkbox_->checked();
- xkb_auto_repeat_pref_.SetValue(enabled);
}
}
@@ -534,14 +456,6 @@ void LanguageSection::ItemChanged(views::Combobox* sender,
}
}
-void LanguageSection::SliderValueChanged(views::Slider* sender) {
- if (xkb_auto_repeat_delay_slider_ == sender) {
- xkb_auto_repeat_delay_pref_.SetValue(sender->value());
- } else if (xkb_auto_repeat_interval_slider_ == sender) {
- xkb_auto_repeat_interval_pref_.SetValue(sender->value());
- }
-}
-
void LanguageSection::NotifyPrefChanged(const std::string* pref_name) {
if (!pref_name || (*pref_name == prefs::kLanguageXkbRemapSearchKeyTo ||
*pref_name == prefs::kLanguageXkbRemapControlKeyTo ||
@@ -567,20 +481,6 @@ void LanguageSection::NotifyPrefChanged(const std::string* pref_name) {
xkb_modifier_combobox_->SetSelectedItem(language_prefs::kNoRemap);
}
}
- if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) {
- const bool enabled = xkb_auto_repeat_pref_.GetValue();
- xkb_auto_repeat_checkbox_->SetChecked(enabled);
- }
- if (!pref_name ||
- *pref_name == language_prefs::kXkbAutoRepeatDelayPref.pref_name) {
- const int delay_value = xkb_auto_repeat_delay_pref_.GetValue();
- xkb_auto_repeat_delay_slider_->SetValue(delay_value);
- }
- if (!pref_name ||
- *pref_name == language_prefs::kXkbAutoRepeatIntervalPref.pref_name) {
- const int interval_value = xkb_auto_repeat_interval_pref_.GetValue();
- xkb_auto_repeat_interval_slider_->SetValue(interval_value);
- }
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index 175fba2..f51ea5d 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -97,12 +97,10 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) {
kLeftControlKey);
prefs->RegisterIntegerPref(prefs::kLanguageXkbRemapAltKeyTo, kLeftAltKey);
prefs->RegisterBooleanPref(prefs::kLanguageXkbAutoRepeatEnabled, true);
- prefs->RegisterIntegerPref(
- language_prefs::kXkbAutoRepeatDelayPref.pref_name,
- language_prefs::kXkbAutoRepeatDelayPref.default_pref_value);
- prefs->RegisterIntegerPref(
- language_prefs::kXkbAutoRepeatIntervalPref.pref_name,
- language_prefs::kXkbAutoRepeatIntervalPref.default_pref_value);
+ prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatDelay,
+ language_prefs::kXkbAutoRepeatDelayInMs);
+ prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatInterval,
+ language_prefs::kXkbAutoRepeatIntervalInMs);
}
void Preferences::Init(PrefService* prefs) {
@@ -166,9 +164,9 @@ void Preferences::Init(PrefService* prefs) {
language_xkb_auto_repeat_enabled_.Init(
prefs::kLanguageXkbAutoRepeatEnabled, prefs, this);
language_xkb_auto_repeat_delay_pref_.Init(
- language_prefs::kXkbAutoRepeatDelayPref.pref_name, prefs, this);
+ prefs::kLanguageXkbAutoRepeatDelay, prefs, this);
language_xkb_auto_repeat_interval_pref_.Init(
- language_prefs::kXkbAutoRepeatIntervalPref.pref_name, prefs, this);
+ prefs::kLanguageXkbAutoRepeatInterval, prefs, this);
std::string locale(g_browser_process->GetApplicationLocale());
// Add input methods based on the application locale when the user first
diff --git a/chrome/browser/resources/options/chromeos_system_options.html b/chrome/browser/resources/options/chromeos_system_options.html
index b7bc161..7b4c909 100644
--- a/chrome/browser/resources/options/chromeos_system_options.html
+++ b/chrome/browser/resources/options/chromeos_system_options.html
@@ -58,48 +58,6 @@
</table>
</section>
<section>
- <h3 i18n-content="keyboard"></h3>
- <table class="option-control-table">
- <tr>
- <td class="option-name" colspan="4"><label><input
- id="repeat-keys-check"
- pref="settings.language.xkb_auto_repeat_enabled"
- type="checkbox"><span
- i18n-content="repeat_keys"></span></label></td>
- </tr>
- <tr>
- <td class="option-name" i18n-content="repeat_delay"></td>
- <td class="option-value">
- <label><span i18n-content="repeat_delay_short"></span></label>
- </td>
- <td class="option-value">
- <input id="repeat-delay-range" type="range"
- i18n-values="min:repeat_delay_min;max:repeat_delay_max"
- pref="settings.language.xkb_auto_repeat_delay"
- class="touch-slider">
- </td>
- <td class="option-value">
- <label><span i18n-content="repeat_delay_long"></span></label>
- </td>
- </tr>
- <tr>
- <td class="option-name" i18n-content="repeat_speed"></td>
- <td class="option-value">
- <label><span i18n-content="repeat_speed_fast"></span></label>
- </td>
- <td class="option-value">
- <input id="repeat-speed-range" type="range"
- i18n-values="min:repeat_speed_min;max:repeat_speed_max"
- pref="settings.language.xkb_auto_repeat_interval"
- class="touch-slider">
- </td>
- <td class="option-value">
- <label><span i18n-content="repeat_speed_slow"></span></label>
- </td>
- </tr>
- </table>
- </section>
- <section>
<h3 i18n-content="accessibility_title"></h3>
<table class="option-control-table">
<tr>
diff --git a/chrome/browser/sync/glue/synchronized_preferences.h b/chrome/browser/sync/glue/synchronized_preferences.h
index 8c69fc3..380cf81 100644
--- a/chrome/browser/sync/glue/synchronized_preferences.h
+++ b/chrome/browser/sync/glue/synchronized_preferences.h
@@ -173,12 +173,15 @@ static const char* kSynchronizedPreferences[] = {
// We don't sync prefs::kLanguageCurrentInputMethod and PreviousInputMethod.
// Keyboard prefs
- prefs::kLanguageXkbAutoRepeatDelay,
- prefs::kLanguageXkbAutoRepeatEnabled,
- prefs::kLanguageXkbAutoRepeatInterval,
prefs::kLanguageXkbRemapAltKeyTo,
prefs::kLanguageXkbRemapControlKeyTo,
prefs::kLanguageXkbRemapSearchKeyTo,
+
+ // We don't sync the following keyboard prefs since they are not user-
+ // configurable:
+ // prefs::kLanguageXkbAutoRepeatDelay,
+ // prefs::kLanguageXkbAutoRepeatEnabled,
+ // prefs::kLanguageXkbAutoRepeatInterval,
#endif
};
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index c8402a3..4e591a7 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -340,13 +340,15 @@ const char kLanguageXkbRemapAltKeyTo[] =
// A boolean pref which determines whether key repeat is enabled.
const char kLanguageXkbAutoRepeatEnabled[] =
- "settings.language.xkb_auto_repeat_enabled";
+ "settings.language.xkb_auto_repeat_enabled_r2";
// A integer pref which determines key repeat delay (in ms).
const char kLanguageXkbAutoRepeatDelay[] =
- "settings.language.xkb_auto_repeat_delay";
+ "settings.language.xkb_auto_repeat_delay_r2";
// A integer pref which determines key repeat interval (in ms).
const char kLanguageXkbAutoRepeatInterval[] =
- "settings.language.xkb_auto_repeat_interval";
+ "settings.language.xkb_auto_repeat_interval_r2";
+// "_r2" suffixes are added to the three prefs above when we change the
+// preferences not user-configurable, not to sync them with cloud.
// A boolean pref which determines whether accessibility is enabled.
const char kAccessibilityEnabled[] = "settings.accessibility";