summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/preferences.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/preferences.cc')
-rw-r--r--chrome/browser/chromeos/preferences.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index ea45ae4..7314803 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -40,6 +40,10 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) {
kChewingMultipleChoicePrefs[i].pref_name,
kChewingMultipleChoicePrefs[i].default_pref_value);
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ prefs->RegisterIntegerPref(kChewingIntegerPrefs[i].pref_name,
+ kChewingIntegerPrefs[i].default_pref_value);
+ }
prefs->RegisterStringPref(prefs::kLanguageHangulKeyboard,
kHangulKeyboardNameIDPairs[0].keyboard_id);
for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
@@ -76,6 +80,10 @@ void Preferences::Init(PrefService* prefs) {
language_chewing_multiple_choice_prefs_[i].Init(
kChewingMultipleChoicePrefs[i].pref_name, prefs, this);
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ language_chewing_integer_prefs_[i].Init(
+ kChewingIntegerPrefs[i].pref_name, prefs, this);
+ }
language_hangul_keyboard_.Init(prefs::kLanguageHangulKeyboard, prefs, this);
for (size_t i = 0; i < kNumPinyinBooleanPrefs; ++i) {
language_pinyin_boolean_prefs_[i].Init(
@@ -154,6 +162,13 @@ void Preferences::NotifyPrefChanged(const std::wstring* pref_name) {
language_chewing_multiple_choice_prefs_[i].GetValue());
}
}
+ for (size_t i = 0; i < kNumChewingIntegerPrefs; ++i) {
+ if (!pref_name || *pref_name == kChewingIntegerPrefs[i].pref_name) {
+ SetLanguageConfigInteger(kChewingSectionName,
+ kChewingIntegerPrefs[i].ibus_config_name,
+ language_chewing_integer_prefs_[i].GetValue());
+ }
+ }
if (!pref_name || *pref_name == prefs::kLanguageHangulKeyboard) {
SetLanguageConfigString(kHangulSectionName, kHangulKeyboardConfigName,
language_hangul_keyboard_.GetValue());