Home | History | Annotate | Download | only in chromeos
      1 // Copyright (c) 2011 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.
      4 
      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"
      9 
     10 namespace chromeos {
     11 namespace language_prefs {
     12 
     13 // ---------------------------------------------------------------------------
     14 // For ibus-daemon
     15 // ---------------------------------------------------------------------------
     16 const char kGeneralSectionName[] = "general";
     17 const char kHotKeySectionName[] = "general/hotkey";
     18 const char kPreloadEnginesConfigName[] = "preload_engines";
     19 const char kNextEngineInMenuConfigName[] = "next_engine_in_menu";
     20 const char kPreviousEngineConfigName[] = "previous_engine";
     21 const char kHotkeyNextEngineInMenu[] =
     22     "Shift+Alt+Release+Shift_L,Shift+Alt+Release+Meta_L,Control+Shift+space,"
     23     "Shift+Alt+Release+Shift_R,Shift+Alt+Release+Meta_R,Zenkaku_Hankaku,Hangul";
     24 const char kHotkeyPreviousEngine[] = "Control+space";
     25 
     26 // ---------------------------------------------------------------------------
     27 // For Traditional Chinese input method (ibus-chewing)
     28 // ---------------------------------------------------------------------------
     29 const char kChewingSectionName[] = "engine/Chewing";
     30 
     31 // We have to sync the |ibus_config_name|s with those in
     32 // ibus-chewing/files/src/Config.cc.
     33 const LanguageBooleanPrefs kChewingBooleanPrefs[] = {
     34   { prefs::kLanguageChewingAutoShiftCur, false, "autoShiftCur",
     35     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR},
     36   { prefs::kLanguageChewingAddPhraseDirection, false, "addPhraseDirection",
     37     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ADD_PHRASE_DIRECTION},
     38   /* Temporarily disabled. (crosbug.com/14185)
     39   { prefs::kLanguageChewingEasySymbolInput, true, "easySymbolInput",
     40     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_EASY_SYMBOL_INPUT},
     41   */
     42   { prefs::kLanguageChewingEscCleanAllBuf, false, "escCleanAllBuf",
     43     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ESC_CLEAN_ALL_BUF},
     44   { prefs::kLanguageChewingForceLowercaseEnglish, false,
     45     "forceLowercaseEnglish",
     46     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH},
     47   /* Temporarily disabled. (crosbug.com/14185)
     48   { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin",
     49     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN},
     50   */
     51   { prefs::kLanguageChewingPhraseChoiceRearward, true, "phraseChoiceRearward",
     52     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD},
     53   { prefs::kLanguageChewingSpaceAsSelection, true, "spaceAsSelection",
     54     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION},
     55 };
     56 COMPILE_ASSERT(kNumChewingBooleanPrefs == arraysize(kChewingBooleanPrefs),
     57                TheSizeShouldMatch);
     58 
     59 const LanguageIntegerRangePreference kChewingIntegerPrefs[] = {
     60   { prefs::kLanguageChewingMaxChiSymbolLen, 20, 8, 40, "maxChiSymbolLen",
     61     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN},
     62   { prefs::kLanguageChewingCandPerPage, 10, 8, 10, "candPerPage",
     63     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE},
     64 };
     65 COMPILE_ASSERT(kNumChewingIntegerPrefs == arraysize(kChewingIntegerPrefs),
     66                TheSizeShouldMatch);
     67 
     68 const LanguageMultipleChoicePreference<const char*>
     69     kChewingMultipleChoicePrefs[] = {
     70   { prefs::kLanguageChewingKeyboardType,
     71     "default",
     72     "KBType",
     73     {{ "default",
     74        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DEFAULT },
     75      { "hsu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HSU },
     76      { "ibm", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_IBM },
     77      { "gin_yieh",
     78        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_GIN_YIEH },
     79      { "eten", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN },
     80      { "eten26", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN26 },
     81      { "dvorak", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK },
     82      { "dvorak_hsu",
     83        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK_HSU },
     84      { "dachen_26",
     85        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DACHEN_26 },
     86      { "hanyu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HANYU }},
     87     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE,
     88   },
     89   { prefs::kLanguageChewingSelKeys,
     90     "1234567890",
     91     "selKeys",
     92     {{ "1234567890",
     93        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234567890 },
     94      { "asdfghjkl;",
     95        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFGHJKLS },
     96      { "asdfzxcv89",
     97        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFZXCV89 },
     98      { "asdfjkl789",
     99        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFJKL789 },
    100      { "aoeu;qjkix",
    101        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUSQJKIX },
    102      { "aoeuhtnsid",
    103        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID },
    104      { "aoeuidhtns",
    105        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS },
    106      { "1234qweras",
    107        IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS }},
    108     IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS,
    109   },
    110 };
    111 COMPILE_ASSERT(kNumChewingMultipleChoicePrefs ==
    112                arraysize(kChewingMultipleChoicePrefs),
    113                TheSizeShouldMatch);
    114 
    115 const LanguageMultipleChoicePreference<int> kChewingHsuSelKeyType = {
    116   prefs::kLanguageChewingHsuSelKeyType,
    117   1,
    118   "hsuSelKeyType",
    119   {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1 },
    120    { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2 }},
    121   IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE,
    122 };
    123 
    124 // ---------------------------------------------------------------------------
    125 // For Korean input method (ibus-hangul)
    126 // ---------------------------------------------------------------------------
    127 const char kHangulSectionName[] = "engine/Hangul";
    128 const char kHangulKeyboardConfigName[] = "HangulKeyboard";
    129 const char kHangulHanjaKeysConfigName[] = "HanjaKeys";
    130 // We add Control+9 since F9 key is reserved by the window manager.
    131 // TODO: HanjaKeys are not configurable yet (and we're not sure if it should.)
    132 const char kHangulHanjaKeys[] = "F9,Hangul_Hanja,Control+9";
    133 
    134 const HangulKeyboardNameIDPair kHangulKeyboardNameIDPairs[] = {
    135   // We have to sync the |keyboard_id|s with those in
    136   // ibus-hangul/files/setup/main.py.
    137   { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_2_SET, "2" },
    138   { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_FINAL,
    139     "3f" },
    140   { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_390, "39" },
    141   { IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_KEYBOARD_3_SET_NO_SHIFT,
    142     "3s" },
    143   // We don't support "Sebeolsik 2 set" keyboard.
    144 };
    145 COMPILE_ASSERT(kNumHangulKeyboardNameIDPairs ==
    146                arraysize(kHangulKeyboardNameIDPairs),
    147                TheSizeShouldMatch);
    148 
    149 // ---------------------------------------------------------------------------
    150 // For Simplified Chinese input method (ibus-pinyin)
    151 // ---------------------------------------------------------------------------
    152 const char kPinyinSectionName[] = "engine/Pinyin";
    153 
    154 // We have to sync the |ibus_config_name|s with those in
    155 // ibus-pinyin/files/src/Config.cc.
    156 const LanguageBooleanPrefs kPinyinBooleanPrefs[] = {
    157   { prefs::kLanguagePinyinCorrectPinyin, true, "CorrectPinyin",
    158     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN },
    159   { prefs::kLanguagePinyinFuzzyPinyin, false, "FuzzyPinyin",
    160     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN },
    161   { prefs::kLanguagePinyinShiftSelectCandidate, false, "ShiftSelectCandidate",
    162     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN },
    163   { prefs::kLanguagePinyinMinusEqualPage, true, "MinusEqualPage",
    164     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE },
    165   { prefs::kLanguagePinyinCommaPeriodPage, true, "CommaPeriodPage",
    166     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE },
    167   { prefs::kLanguagePinyinAutoCommit, false, "AutoCommit",
    168     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT },
    169   { prefs::kLanguagePinyinDoublePinyin, false, "DoublePinyin",
    170     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN },
    171   { prefs::kLanguagePinyinInitChinese, true, "InitChinese",
    172     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE },
    173   { prefs::kLanguagePinyinInitFull, false, "InitFull",
    174     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL },
    175   { prefs::kLanguagePinyinInitFullPunct, true, "InitFullPunct",
    176     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT },
    177   { prefs::kLanguagePinyinInitSimplifiedChinese, true, "InitSimplifiedChinese",
    178     IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE },
    179   // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32
    180   // additional boolean prefs.)
    181 };
    182 COMPILE_ASSERT(kNumPinyinBooleanPrefs == arraysize(kPinyinBooleanPrefs),
    183                TheSizeShouldMatch);
    184 // TODO(yusukes): Support HalfWidthPuncts and IncompletePinyin prefs if needed.
    185 
    186 const LanguageMultipleChoicePreference<int> kPinyinDoublePinyinSchema = {
    187   prefs::kLanguagePinyinDoublePinyinSchema,
    188   0,
    189   "DoublePinyinSchema",
    190   {{ 0, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_MSPY},
    191    { 1, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZRM},
    192    { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ABC},
    193    { 3, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZGPY},
    194    { 4, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_PYJJ}},
    195   IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA,
    196 };
    197 
    198 const PinyinIntegerPref kPinyinIntegerPrefs[] = {
    199   // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint.
    200   { prefs::kLanguagePinyinLookupTablePageSize, 5, "LookupTablePageSize" },
    201 };
    202 COMPILE_ASSERT(kNumPinyinIntegerPrefs == arraysize(kPinyinIntegerPrefs),
    203                TheSizeShouldMatch);
    204 
    205 // ---------------------------------------------------------------------------
    206 // For Japanese input method (ibus-mozc)
    207 // ---------------------------------------------------------------------------
    208 const char kMozcSectionName[] = "engine/Mozc";
    209 
    210 #define IDS_MOZC(suffix) \
    211     IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_##suffix
    212 
    213 const LanguageBooleanPrefs kMozcBooleanPrefs[] = {
    214   { prefs::kLanguageMozcIncognitoMode,
    215     false,
    216     "incognito_mode",
    217     IDS_MOZC(INCOGNITO_MODE)
    218   },
    219   { prefs::kLanguageMozcUseAutoImeTurnOff,
    220     true,
    221     "use_auto_ime_turn_off",
    222     IDS_MOZC(USE_AUTO_IME_TURN_OFF)
    223   },
    224   { prefs::kLanguageMozcUseDateConversion,
    225     true,
    226     "use_date_conversion",
    227     IDS_MOZC(USE_DATE_CONVERSION)
    228   },
    229   { prefs::kLanguageMozcUseSingleKanjiConversion,
    230     true,
    231     "use_single_kanji_conversion",
    232     IDS_MOZC(USE_SINGLE_KANJI_CONVERSION)
    233   },
    234   { prefs::kLanguageMozcUseSymbolConversion,
    235     true,
    236     "use_symbol_conversion",
    237     IDS_MOZC(USE_SYMBOL_CONVERSION)
    238   },
    239   { prefs::kLanguageMozcUseNumberConversion,
    240     true,
    241     "use_number_conversion",
    242     IDS_MOZC(USE_NUMBER_CONVERSION)
    243   },
    244   { prefs::kLanguageMozcUseHistorySuggest,
    245     true,
    246     "use_history_suggest",
    247     IDS_MOZC(USE_HISTORY_SUGGEST)
    248   },
    249   { prefs::kLanguageMozcUseDictionarySuggest,
    250     true,
    251     "use_dictionary_suggest",
    252     IDS_MOZC(USE_DICTIONARY_SUGGEST)
    253   },
    254 };
    255 COMPILE_ASSERT(kNumMozcBooleanPrefs == arraysize(kMozcBooleanPrefs),
    256                TheSizeShouldMatch);
    257 
    258 extern const LanguageMultipleChoicePreference<const char*>
    259     kMozcMultipleChoicePrefs[] = {
    260   { prefs::kLanguageMozcPreeditMethod,
    261     "ROMAN",
    262     "preedit_method",
    263     {{ "ROMAN", IDS_MOZC(PREEDIT_METHOD_ROMAN) },
    264      { "KANA", IDS_MOZC(PREEDIT_METHOD_KANA) }},
    265     IDS_MOZC(PREEDIT_METHOD),
    266   },
    267   { prefs::kLanguageMozcSessionKeymap,
    268     "MSIME",
    269     "session_keymap",
    270     {{ "ATOK", IDS_MOZC(SESSION_KEYMAP_ATOK) },
    271      { "MSIME", IDS_MOZC(SESSION_KEYMAP_MSIME) },
    272      { "KOTOERI", IDS_MOZC(SESSION_KEYMAP_KOTOERI) }},
    273     // TODO: Support "CUSTOM" keymap.
    274     IDS_MOZC(SESSION_KEYMAP),
    275   },
    276   { prefs::kLanguageMozcPunctuationMethod,
    277     "KUTEN_TOUTEN",
    278     "punctuation_method",
    279     {{ "KUTEN_TOUTEN",
    280        IDS_MOZC(PUNCTUATION_METHOD_KUTEN_TOUTEN) },
    281      { "COMMA_PERIOD",
    282        IDS_MOZC(PUNCTUATION_METHOD_COMMA_PERIOD) },
    283      { "KUTEN_PERIOD",
    284        IDS_MOZC(PUNCTUATION_METHOD_KUTEN_PERIOD) },
    285      { "COMMA_TOUTEN",
    286        IDS_MOZC(PUNCTUATION_METHOD_COMMA_TOUTEN) }},
    287     IDS_MOZC(PUNCTUATION_METHOD),
    288   },
    289   { prefs::kLanguageMozcSymbolMethod,
    290     "CORNER_BRACKET_MIDDLE_DOT",
    291     "symbol_method",
    292     {{ "CORNER_BRACKET_MIDDLE_DOT",
    293        IDS_MOZC(SYMBOL_METHOD_CORNER_BRACKET_MIDDLE_DOT) },
    294      { "SQUARE_BRACKET_SLASH",
    295        IDS_MOZC(SYMBOL_METHOD_SQUARE_BRACKET_SLASH) },
    296      { "CORNER_BRACKET_SLASH",
    297        IDS_MOZC(SYMBOL_METHOD_CORNER_BRACKET_SLASH) },
    298      { "SQUARE_BRACKET_MIDDLE_DOT",
    299        IDS_MOZC(SYMBOL_METHOD_SQUARE_BRACKET_MIDDLE_DOT) }},
    300     IDS_MOZC(SYMBOL_METHOD),
    301   },
    302   { prefs::kLanguageMozcSpaceCharacterForm,
    303     "FUNDAMENTAL_INPUT_MODE",
    304     "space_character_form",
    305     {{ "FUNDAMENTAL_INPUT_MODE",
    306        IDS_MOZC(SPACE_CHARACTER_FORM_FUNDAMENTAL_INPUT_MODE) },
    307      { "FUNDAMENTAL_FULL_WIDTH",
    308        IDS_MOZC(SPACE_CHARACTER_FORM_FUNDAMENTAL_FULL_WIDTH) },
    309      { "FUNDAMENTAL_HALF_WIDTH",
    310        IDS_MOZC(SPACE_CHARACTER_FORM_FUNDAMENTAL_HALF_WIDTH) }},
    311     IDS_MOZC(SPACE_CHARACTER_FORM),
    312   },
    313   { prefs::kLanguageMozcHistoryLearningLevel,
    314     "DEFAULT_HISTORY",
    315     "history_learning_level",
    316     {{ "DEFAULT_HISTORY",
    317        IDS_MOZC(HISTORY_LEARNING_LEVEL_DEFAULT_HISTORY) },
    318      { "READ_ONLY",
    319        IDS_MOZC(HISTORY_LEARNING_LEVEL_READ_ONLY) },
    320      { "NO_HISTORY",
    321        IDS_MOZC(HISTORY_LEARNING_LEVEL_NO_HISTORY) }},
    322     IDS_MOZC(HISTORY_LEARNING_LEVEL),
    323   },
    324   // TODO(mazda): Uncomment this block once the candidate window in Chrome OS
    325   // supports changing shortcut labels.
    326   // { prefs::kLanguageMozcSelectionShortcut,
    327   //   "SHORTCUT_123456789",
    328   //   "selection_shortcut",
    329   //   {{ "NO_SHORTCUT",
    330   //      IDS_MOZC(SELECTION_SHORTCUT_NO_SHORTCUT) },
    331   //    { "SHORTCUT_123456789",
    332   //      IDS_MOZC(SELECTION_SHORTCUT_SHORTCUT_123456789) },
    333   //    { "SHORTCUT_ASDFGHJKL",
    334   //      IDS_MOZC(SELECTION_SHORTCUT_SHORTCUT_ASDFGHJKL) }},
    335   //   IDS_MOZC(SELECTION_SHORTCUT),
    336   // },
    337   { prefs::kLanguageMozcShiftKeyModeSwitch,
    338     "ASCII_INPUT_MODE",
    339     "shift_key_mode_switch",
    340     {{ "OFF",
    341        IDS_MOZC(SHIFT_KEY_MODE_SWITCH_OFF) },
    342      { "ASCII_INPUT_MODE",
    343        IDS_MOZC(SHIFT_KEY_MODE_SWITCH_ASCII_INPUT_MODE) },
    344      { "KATAKANA_INPUT_MODE",
    345        IDS_MOZC(SHIFT_KEY_MODE_SWITCH_KATAKANA_INPUT_MODE) }},
    346     IDS_MOZC(SHIFT_KEY_MODE_SWITCH),
    347   },
    348   { prefs::kLanguageMozcNumpadCharacterForm,
    349     "NUMPAD_HALF_WIDTH",
    350     "numpad_character_form",
    351     {{ "NUMPAD_INPUT_MODE",
    352        IDS_MOZC(NUMPAD_CHARACTER_FORM_NUMPAD_INPUT_MODE) },
    353      { "NUMPAD_FULL_WIDTH",
    354        IDS_MOZC(NUMPAD_CHARACTER_FORM_NUMPAD_FULL_WIDTH) },
    355      { "NUMPAD_HALF_WIDTH",
    356        IDS_MOZC(NUMPAD_CHARACTER_FORM_NUMPAD_HALF_WIDTH) },
    357      { "NUMPAD_DIRECT_INPUT",
    358        IDS_MOZC(NUMPAD_CHARACTER_FORM_NUMPAD_DIRECT_INPUT) }},
    359     IDS_MOZC(NUMPAD_CHARACTER_FORM),
    360   },
    361 };
    362 COMPILE_ASSERT(kNumMozcMultipleChoicePrefs ==
    363                arraysize(kMozcMultipleChoicePrefs),
    364                TheSizeShouldMatch);
    365 
    366 const LanguageIntegerRangePreference kMozcIntegerPrefs[] = {
    367   { prefs::kLanguageMozcSuggestionsSize, 3, 1, 9, "suggestions_size",
    368     IDS_MOZC(SUGGESTIONS_SIZE)},
    369 };
    370 COMPILE_ASSERT(kNumMozcIntegerPrefs == arraysize(kMozcIntegerPrefs),
    371                TheSizeShouldMatch);
    372 
    373 #undef IDS_MOZC
    374 
    375 // ---------------------------------------------------------------------------
    376 // For keyboard stuff
    377 // ---------------------------------------------------------------------------
    378 const LanguageMultipleChoicePreference<int> kXkbModifierMultipleChoicePrefs = {
    379   NULL,  // don't use this field since the config is associated with 3 prefs.
    380   kNoRemap,
    381   NULL,  // does not use the ibus configuration service.
    382   {{ kNoRemap, IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_MODIFIER_NO_REMAP },
    383    { kSwapCtrlAndAlt,
    384      IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_MODIFIER_REMAP_CTRL_ALT },
    385    { kSwapSearchAndCtrl,
    386      IDS_OPTIONS_SETTINGS_LANGUAGES_XKB_MODIFIER_REMAP_SEARCH_CTRL }},
    387   0,  // does not use the label.
    388 };
    389 
    390 const int kXkbAutoRepeatDelayInMs = 500;
    391 const int kXkbAutoRepeatIntervalInMs = 50;
    392 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout";
    393 
    394 }  // namespace language_prefs
    395 }  // namespace chromeos
    396