1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/basictypes.h"
6 #include "chrome/browser/chromeos/language_preferences.h"
7 #include "chrome/common/pref_names.h"
8 #include "grit/generated_resources.h"
11 namespace language_prefs
{
13 // ---------------------------------------------------------------------------
15 // ---------------------------------------------------------------------------
16 const char kGeneralSectionName
[] = "general";
17 const char kPreloadEnginesConfigName
[] = "preload_engines";
19 // ---------------------------------------------------------------------------
20 // For Traditional Chinese input method (ibus-mozc-chewing)
21 // ---------------------------------------------------------------------------
22 const char kChewingSectionName
[] = "engine/Chewing";
24 // We have to sync the |ibus_config_name|s with those in
25 // ibus-chewing/files/src/Config.cc.
26 const LanguageBooleanPrefs kChewingBooleanPrefs
[] = {
27 { prefs::kLanguageChewingAutoShiftCur
, false, "autoShiftCur",
28 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR
,
29 PrefService::SYNCABLE_PREF
},
30 { prefs::kLanguageChewingAddPhraseDirection
, false, "addPhraseDirection",
31 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ADD_PHRASE_DIRECTION
,
32 PrefService::SYNCABLE_PREF
},
33 /* Temporarily disabled. (crosbug.com/14185)
34 { prefs::kLanguageChewingEasySymbolInput, true, "easySymbolInput",
35 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_EASY_SYMBOL_INPUT,
36 PrefService::SYNCABLE_PREF },
38 { prefs::kLanguageChewingEscCleanAllBuf
, false, "escCleanAllBuf",
39 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ESC_CLEAN_ALL_BUF
,
40 PrefService::SYNCABLE_PREF
},
41 { prefs::kLanguageChewingForceLowercaseEnglish
, false,
42 "forceLowercaseEnglish",
43 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH
,
44 PrefService::SYNCABLE_PREF
},
45 /* Temporarily disabled. (crosbug.com/14185)
46 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin",
47 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN,
48 PrefService::SYNCABLE_PREF },
50 { prefs::kLanguageChewingPhraseChoiceRearward
, true, "phraseChoiceRearward",
51 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD
,
52 PrefService::SYNCABLE_PREF
},
53 { prefs::kLanguageChewingSpaceAsSelection
, true, "spaceAsSelection",
54 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION
,
55 PrefService::SYNCABLE_PREF
},
57 COMPILE_ASSERT(kNumChewingBooleanPrefs
== arraysize(kChewingBooleanPrefs
),
60 const LanguageIntegerRangePreference kChewingIntegerPrefs
[] = {
61 { prefs::kLanguageChewingMaxChiSymbolLen
, 20, 8, 40, "maxChiSymbolLen",
62 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN
,
63 PrefService::SYNCABLE_PREF
65 { prefs::kLanguageChewingCandPerPage
, 10, 8, 10, "candPerPage",
66 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE
,
67 PrefService::SYNCABLE_PREF
70 COMPILE_ASSERT(kNumChewingIntegerPrefs
== arraysize(kChewingIntegerPrefs
),
73 const LanguageMultipleChoicePreference
<const char*>
74 kChewingMultipleChoicePrefs
[] = {
75 { prefs::kLanguageChewingKeyboardType
,
79 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DEFAULT
},
80 { "hsu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HSU
},
81 { "ibm", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_IBM
},
83 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_GIN_YIEH
},
84 { "eten", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN
},
85 { "eten26", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN26
},
86 { "dvorak", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK
},
88 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK_HSU
},
90 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DACHEN_26
},
91 { "hanyu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HANYU
}},
92 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE
,
93 PrefService::SYNCABLE_PREF
,
95 { prefs::kLanguageChewingSelKeys
,
99 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234567890
},
101 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFGHJKLS
},
103 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFZXCV89
},
105 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFJKL789
},
107 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUSQJKIX
},
109 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID
},
111 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS
},
113 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS
}},
114 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS
,
115 PrefService::SYNCABLE_PREF
,
118 COMPILE_ASSERT(kNumChewingMultipleChoicePrefs
==
119 arraysize(kChewingMultipleChoicePrefs
),
122 const LanguageMultipleChoicePreference
<int> kChewingHsuSelKeyType
= {
123 prefs::kLanguageChewingHsuSelKeyType
,
126 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1
},
127 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2
}},
128 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE
,
129 PrefService::SYNCABLE_PREF
,
132 // ---------------------------------------------------------------------------
133 // For Korean input method (ibus-mozc-hangul)
134 // ---------------------------------------------------------------------------
135 const char kHangulSectionName
[] = "engine/Hangul";
136 const char kHangulKeyboardConfigName
[] = "HangulKeyboard";
138 const char kHangulHanjaBindingKeysConfigName
[] = "HanjaKeyBindings";
139 // Mozc-hangul treats Hangul_Hanja key as hanja key event even if it is not set.
140 // We add Control+9 since F9 key is reserved by the window manager.
141 // TODO(nona): Hanja keys are not configurable yet (and we're not sure if it
143 const char kHangulHanjaBindingKeys
[] = "F9,Ctrl 9";
145 const HangulKeyboardNameIDPair kHangulKeyboardNameIDPairs
[] = {
146 // We have to sync the |keyboard_id|s with those in libhangul.
147 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_2_SET
, "2" },
148 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_FINAL
,
150 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_390
, "39" },
151 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_NO_SHIFT
,
153 { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_ROMAJA
, "ro" },
154 // We don't support "Sebeolsik 2 set" keyboard.
156 COMPILE_ASSERT(kNumHangulKeyboardNameIDPairs
==
157 arraysize(kHangulKeyboardNameIDPairs
),
160 // ---------------------------------------------------------------------------
161 // For Simplified Chinese input method (ibus-mozc-pinyin)
162 // ---------------------------------------------------------------------------
163 const char kPinyinSectionName
[] = "engine/Pinyin";
165 // We have to sync the |ibus_config_name|s with those in
166 // ibus-mozc-pinyin/files/languages/pinyin/unix/ibus/config_updater.cc.
167 const LanguageBooleanPrefs kPinyinBooleanPrefs
[] = {
168 { prefs::kLanguagePinyinCorrectPinyin
, true, "CorrectPinyin",
169 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN
,
170 PrefService::SYNCABLE_PREF
},
171 { prefs::kLanguagePinyinFuzzyPinyin
, false, "FuzzyPinyin",
172 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN
,
173 PrefService::SYNCABLE_PREF
},
174 { prefs::kLanguagePinyinShiftSelectCandidate
, false, "ShiftSelectCandidate",
175 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN
,
176 PrefService::SYNCABLE_PREF
},
177 { prefs::kLanguagePinyinMinusEqualPage
, true, "MinusEqualPage",
178 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE
,
179 PrefService::SYNCABLE_PREF
},
180 { prefs::kLanguagePinyinCommaPeriodPage
, true, "CommaPeriodPage",
181 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE
,
182 PrefService::SYNCABLE_PREF
},
183 { prefs::kLanguagePinyinAutoCommit
, false, "AutoCommit",
184 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT
,
185 PrefService::SYNCABLE_PREF
},
186 { prefs::kLanguagePinyinDoublePinyin
, false, "DoublePinyin",
187 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN
,
188 PrefService::SYNCABLE_PREF
},
189 { prefs::kLanguagePinyinInitChinese
, true, "InitChinese",
190 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE
,
191 PrefService::SYNCABLE_PREF
},
192 { prefs::kLanguagePinyinInitFull
, false, "InitFull",
193 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL
,
194 PrefService::SYNCABLE_PREF
},
195 { prefs::kLanguagePinyinInitFullPunct
, true, "InitFullPunct",
196 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT
,
197 PrefService::SYNCABLE_PREF
},
198 { prefs::kLanguagePinyinInitSimplifiedChinese
, true, "InitSimplifiedChinese",
199 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE
,
200 PrefService::SYNCABLE_PREF
},
201 // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32
202 // additional boolean prefs.)
204 COMPILE_ASSERT(kNumPinyinBooleanPrefs
== arraysize(kPinyinBooleanPrefs
),
206 // TODO(yusukes): Support HalfWidthPuncts and IncompletePinyin prefs if needed.
208 const LanguageMultipleChoicePreference
<int> kPinyinDoublePinyinSchema
= {
209 prefs::kLanguagePinyinDoublePinyinSchema
,
211 "DoublePinyinSchema",
212 {{ 0, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_MSPY
},
213 { 1, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZRM
},
214 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ABC
},
215 { 3, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZGPY
},
216 { 4, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_PYJJ
}},
217 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA
,
218 PrefService::SYNCABLE_PREF
,
221 const PinyinIntegerPref kPinyinIntegerPrefs
[] = {
222 // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint.
223 { prefs::kLanguagePinyinLookupTablePageSize
, 5, "LookupTablePageSize",
224 PrefService::UNSYNCABLE_PREF
} // don't sync as it's not user configurable.
226 COMPILE_ASSERT(kNumPinyinIntegerPrefs
== arraysize(kPinyinIntegerPrefs
),
229 // ---------------------------------------------------------------------------
230 // For Japanese input method (ibus-mozc)
231 // ---------------------------------------------------------------------------
232 const char kMozcSectionName
[] = "engine/Mozc";
234 const LanguageBooleanPrefs kMozcBooleanPrefs
[] = {
235 { prefs::kLanguageMozcIncognitoMode
,
238 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_INCOGNITO_MODE
,
239 PrefService::SYNCABLE_PREF
},
240 { prefs::kLanguageMozcUseAutoImeTurnOff
,
242 "use_auto_ime_turn_off",
243 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_AUTO_IME_TURN_OFF
,
244 PrefService::SYNCABLE_PREF
},
245 { prefs::kLanguageMozcUseHistorySuggest
,
247 "use_history_suggest",
248 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_HISTORY_SUGGEST
,
249 PrefService::SYNCABLE_PREF
},
250 { prefs::kLanguageMozcUseDictionarySuggest
,
252 "use_dictionary_suggest",
253 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_DICTIONARY_SUGGEST
,
254 PrefService::SYNCABLE_PREF
},
256 COMPILE_ASSERT(kNumMozcBooleanPrefs
== arraysize(kMozcBooleanPrefs
),
259 extern const LanguageMultipleChoicePreference
<const char*>
260 kMozcMultipleChoicePrefs
[] = {
261 { prefs::kLanguageMozcPreeditMethod
,
264 {{ "ROMAN", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_ROMAN
},
265 { "KANA", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_KANA
}},
266 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD
,
267 PrefService::SYNCABLE_PREF
,
269 { prefs::kLanguageMozcSessionKeymap
,
272 {{ "ATOK", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_ATOK
},
273 { "MSIME", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_MSIME
},
274 { "KOTOERI", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_KOTOERI
}},
275 // TODO: Support "CUSTOM" keymap.
276 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP
,
277 PrefService::SYNCABLE_PREF
,
279 { prefs::kLanguageMozcPunctuationMethod
,
281 "punctuation_method",
283 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_TOUTEN
},
285 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_PERIOD
},
287 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_PERIOD
},
289 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_TOUTEN
}},
290 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD
,
291 PrefService::SYNCABLE_PREF
,
293 { prefs::kLanguageMozcSymbolMethod
,
294 "CORNER_BRACKET_MIDDLE_DOT",
296 {{ "CORNER_BRACKET_MIDDLE_DOT",
297 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_MIDDLE_DOT
},
298 { "SQUARE_BRACKET_SLASH",
299 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_SLASH
},
300 { "CORNER_BRACKET_SLASH",
301 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_SLASH
},
302 { "SQUARE_BRACKET_MIDDLE_DOT",
303 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_MIDDLE_DOT
}},
304 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD
,
305 PrefService::SYNCABLE_PREF
,
307 { prefs::kLanguageMozcSpaceCharacterForm
,
308 "FUNDAMENTAL_INPUT_MODE",
309 "space_character_form",
310 {{ "FUNDAMENTAL_INPUT_MODE",
311 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_INPUT_MODE
},
312 { "FUNDAMENTAL_FULL_WIDTH",
313 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_FULL_WIDTH
},
314 { "FUNDAMENTAL_HALF_WIDTH",
315 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_HALF_WIDTH
}},
316 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM
,
317 PrefService::SYNCABLE_PREF
,
319 { prefs::kLanguageMozcHistoryLearningLevel
,
321 "history_learning_level",
322 {{ "DEFAULT_HISTORY",
323 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_DEFAULT_HISTORY
},
325 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_READ_ONLY
},
327 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_NO_HISTORY
}},
328 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL
,
329 PrefService::SYNCABLE_PREF
,
331 // TODO(mazda): Uncomment this block once the candidate window in Chrome OS
332 // supports changing shortcut labels.
333 // { prefs::kLanguageMozcSelectionShortcut,
334 // "SHORTCUT_123456789",
335 // "selection_shortcut",
337 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_NO_SHORTCUT },
338 // { "SHORTCUT_123456789",
339 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_123456789 },
340 // { "SHORTCUT_ASDFGHJKL",
341 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_ASDFGHJKL }},
342 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT,
343 // PrefService::SYNCABLE_PREF,
345 { prefs::kLanguageMozcShiftKeyModeSwitch
,
347 "shift_key_mode_switch",
349 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_OFF
},
350 { "ASCII_INPUT_MODE",
351 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_ASCII_INPUT_MODE
},
352 { "KATAKANA_INPUT_MODE",
353 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_KATAKANA_INPUT_MODE
}},
354 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH
,
355 PrefService::SYNCABLE_PREF
,
357 { prefs::kLanguageMozcNumpadCharacterForm
,
359 "numpad_character_form",
360 {{ "NUMPAD_INPUT_MODE",
361 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_INPUT_MODE
},
362 { "NUMPAD_FULL_WIDTH",
363 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_FULL_WIDTH
},
364 { "NUMPAD_HALF_WIDTH",
365 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_HALF_WIDTH
},
366 { "NUMPAD_DIRECT_INPUT",
367 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_DIRECT_INPUT
}},
368 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM
,
369 PrefService::SYNCABLE_PREF
,
372 COMPILE_ASSERT(kNumMozcMultipleChoicePrefs
==
373 arraysize(kMozcMultipleChoicePrefs
),
376 const LanguageIntegerRangePreference kMozcIntegerPrefs
[] = {
377 { prefs::kLanguageMozcSuggestionsSize
, 3, 1, 9, "suggestions_size",
378 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SUGGESTIONS_SIZE
,
379 PrefService::SYNCABLE_PREF
}
381 COMPILE_ASSERT(kNumMozcIntegerPrefs
== arraysize(kMozcIntegerPrefs
),
384 // ---------------------------------------------------------------------------
385 // For keyboard stuff
386 // ---------------------------------------------------------------------------
387 const int kXkbAutoRepeatDelayInMs
= 500;
388 const int kXkbAutoRepeatIntervalInMs
= 50;
389 const char kPreferredKeyboardLayout
[] = "PreferredKeyboardLayout";
391 void RegisterPrefs(PrefService
* local_state
) {
392 // We use an empty string here rather than a hardware keyboard layout name
393 // since input_method::GetHardwareInputMethodId() might return a fallback
394 // layout name if local_state->RegisterStringPref(kHardwareKeyboardLayout)
395 // is not called yet.
396 local_state
->RegisterStringPref(kPreferredKeyboardLayout
,
398 PrefService::UNSYNCABLE_PREF
);
401 } // namespace language_prefs
402 } // namespace chromeos