OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "chrome/browser/chromeos/language_preferences.h" | 6 #include "chrome/browser/chromeos/language_preferences.h" |
7 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
8 #include "grit/generated_resources.h" | 8 #include "grit/generated_resources.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 namespace language_prefs { | 11 namespace language_prefs { |
12 | 12 |
13 // --------------------------------------------------------------------------- | 13 // --------------------------------------------------------------------------- |
14 // For ibus-daemon | 14 // For ibus-daemon |
15 // --------------------------------------------------------------------------- | 15 // --------------------------------------------------------------------------- |
16 const char kGeneralSectionName[] = "general"; | 16 const char kGeneralSectionName[] = "general"; |
17 const char kPreloadEnginesConfigName[] = "preload_engines"; | 17 const char kPreloadEnginesConfigName[] = "preload_engines"; |
18 | 18 |
19 // --------------------------------------------------------------------------- | 19 // --------------------------------------------------------------------------- |
20 // For Traditional Chinese input method (ibus-mozc-chewing) | 20 // For Traditional Chinese input method (ibus-mozc-chewing) |
21 // --------------------------------------------------------------------------- | 21 // --------------------------------------------------------------------------- |
22 const char kChewingSectionName[] = "engine/Chewing"; | 22 const char kChewingSectionName[] = "engine/Chewing"; |
23 | 23 |
24 // We have to sync the |ibus_config_name|s with those in | 24 // We have to sync the |ibus_config_name|s with those in |
25 // ibus-chewing/files/src/Config.cc. | 25 // ibus-chewing/files/src/Config.cc. |
26 const LanguageBooleanPrefs kChewingBooleanPrefs[] = { | 26 const LanguageBooleanPrefs kChewingBooleanPrefs[] = { |
27 { prefs::kLanguageChewingAutoShiftCur, false, "autoShiftCur", | 27 { prefs::kLanguageChewingAutoShiftCur, false, "autoShiftCur", |
28 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR, | 28 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_AUTO_SHIFT_CUR, |
29 PrefService::SYNCABLE_PREF }, | 29 PrefServiceSyncable::SYNCABLE_PREF }, |
30 { prefs::kLanguageChewingAddPhraseDirection, false, "addPhraseDirection", | 30 { prefs::kLanguageChewingAddPhraseDirection, false, "addPhraseDirection", |
31 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ADD_PHRASE_DIRECTION, | 31 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ADD_PHRASE_DIRECTION, |
32 PrefService::SYNCABLE_PREF }, | 32 PrefServiceSyncable::SYNCABLE_PREF }, |
33 /* Temporarily disabled. (crosbug.com/14185) | 33 /* Temporarily disabled. (crosbug.com/14185) |
34 { prefs::kLanguageChewingEasySymbolInput, true, "easySymbolInput", | 34 { prefs::kLanguageChewingEasySymbolInput, true, "easySymbolInput", |
35 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_EASY_SYMBOL_INPUT, | 35 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_EASY_SYMBOL_INPUT, |
36 PrefService::SYNCABLE_PREF }, | 36 PrefServiceSyncable::SYNCABLE_PREF }, |
37 */ | 37 */ |
38 { prefs::kLanguageChewingEscCleanAllBuf, false, "escCleanAllBuf", | 38 { prefs::kLanguageChewingEscCleanAllBuf, false, "escCleanAllBuf", |
39 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ESC_CLEAN_ALL_BUF, | 39 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_ESC_CLEAN_ALL_BUF, |
40 PrefService::SYNCABLE_PREF }, | 40 PrefServiceSyncable::SYNCABLE_PREF }, |
41 { prefs::kLanguageChewingForceLowercaseEnglish, false, | 41 { prefs::kLanguageChewingForceLowercaseEnglish, false, |
42 "forceLowercaseEnglish", | 42 "forceLowercaseEnglish", |
43 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH, | 43 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH, |
44 PrefService::SYNCABLE_PREF }, | 44 PrefServiceSyncable::SYNCABLE_PREF }, |
45 /* Temporarily disabled. (crosbug.com/14185) | 45 /* Temporarily disabled. (crosbug.com/14185) |
46 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin", | 46 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin", |
47 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN, | 47 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN, |
48 PrefService::SYNCABLE_PREF }, | 48 PrefServiceSyncable::SYNCABLE_PREF }, |
49 */ | 49 */ |
50 { prefs::kLanguageChewingPhraseChoiceRearward, true, "phraseChoiceRearward", | 50 { prefs::kLanguageChewingPhraseChoiceRearward, true, "phraseChoiceRearward", |
51 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD, | 51 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD, |
52 PrefService::SYNCABLE_PREF }, | 52 PrefServiceSyncable::SYNCABLE_PREF }, |
53 { prefs::kLanguageChewingSpaceAsSelection, true, "spaceAsSelection", | 53 { prefs::kLanguageChewingSpaceAsSelection, true, "spaceAsSelection", |
54 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION, | 54 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION, |
55 PrefService::SYNCABLE_PREF }, | 55 PrefServiceSyncable::SYNCABLE_PREF }, |
56 }; | 56 }; |
57 COMPILE_ASSERT(kNumChewingBooleanPrefs == arraysize(kChewingBooleanPrefs), | 57 COMPILE_ASSERT(kNumChewingBooleanPrefs == arraysize(kChewingBooleanPrefs), |
58 TheSizeShouldMatch); | 58 TheSizeShouldMatch); |
59 | 59 |
60 const LanguageIntegerRangePreference kChewingIntegerPrefs[] = { | 60 const LanguageIntegerRangePreference kChewingIntegerPrefs[] = { |
61 { prefs::kLanguageChewingMaxChiSymbolLen, 20, 8, 40, "maxChiSymbolLen", | 61 { prefs::kLanguageChewingMaxChiSymbolLen, 20, 8, 40, "maxChiSymbolLen", |
62 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN, | 62 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN, |
63 PrefService::SYNCABLE_PREF | 63 PrefServiceSyncable::SYNCABLE_PREF |
64 }, | 64 }, |
65 { prefs::kLanguageChewingCandPerPage, 10, 8, 10, "candPerPage", | 65 { prefs::kLanguageChewingCandPerPage, 10, 8, 10, "candPerPage", |
66 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE, | 66 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE, |
67 PrefService::SYNCABLE_PREF | 67 PrefServiceSyncable::SYNCABLE_PREF |
68 }, | 68 }, |
69 }; | 69 }; |
70 COMPILE_ASSERT(kNumChewingIntegerPrefs == arraysize(kChewingIntegerPrefs), | 70 COMPILE_ASSERT(kNumChewingIntegerPrefs == arraysize(kChewingIntegerPrefs), |
71 TheSizeShouldMatch); | 71 TheSizeShouldMatch); |
72 | 72 |
73 const LanguageMultipleChoicePreference<const char*> | 73 const LanguageMultipleChoicePreference<const char*> |
74 kChewingMultipleChoicePrefs[] = { | 74 kChewingMultipleChoicePrefs[] = { |
75 { prefs::kLanguageChewingKeyboardType, | 75 { prefs::kLanguageChewingKeyboardType, |
76 "default", | 76 "default", |
77 "KBType", | 77 "KBType", |
78 {{ "default", | 78 {{ "default", |
79 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DEFAULT }, | 79 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DEFAULT }, |
80 { "hsu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HSU }, | 80 { "hsu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HSU }, |
81 { "ibm", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_IBM }, | 81 { "ibm", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_IBM }, |
82 { "gin_yieh", | 82 { "gin_yieh", |
83 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_GIN_YIEH }, | 83 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_GIN_YIEH }, |
84 { "eten", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN }, | 84 { "eten", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN }, |
85 { "eten26", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN26 }, | 85 { "eten26", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_ETEN26 }, |
86 { "dvorak", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK }, | 86 { "dvorak", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK }, |
87 { "dvorak_hsu", | 87 { "dvorak_hsu", |
88 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK_HSU }, | 88 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DVORAK_HSU }, |
89 { "dachen_26", | 89 { "dachen_26", |
90 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DACHEN_26 }, | 90 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_DACHEN_26 }, |
91 { "hanyu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HANYU }}, | 91 { "hanyu", IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE_HANYU }}, |
92 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE, | 92 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_KEYBOARD_TYPE, |
93 PrefService::SYNCABLE_PREF, | 93 PrefServiceSyncable::SYNCABLE_PREF, |
94 }, | 94 }, |
95 { prefs::kLanguageChewingSelKeys, | 95 { prefs::kLanguageChewingSelKeys, |
96 "1234567890", | 96 "1234567890", |
97 "selKeys", | 97 "selKeys", |
98 {{ "1234567890", | 98 {{ "1234567890", |
99 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234567890 }, | 99 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234567890 }, |
100 { "asdfghjkl;", | 100 { "asdfghjkl;", |
101 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFGHJKLS }, | 101 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFGHJKLS }, |
102 { "asdfzxcv89", | 102 { "asdfzxcv89", |
103 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFZXCV89 }, | 103 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFZXCV89 }, |
104 { "asdfjkl789", | 104 { "asdfjkl789", |
105 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFJKL789 }, | 105 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_ASDFJKL789 }, |
106 { "aoeu;qjkix", | 106 { "aoeu;qjkix", |
107 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUSQJKIX }, | 107 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUSQJKIX }, |
108 { "aoeuhtnsid", | 108 { "aoeuhtnsid", |
109 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID }, | 109 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID }, |
110 { "aoeuidhtns", | 110 { "aoeuidhtns", |
111 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS }, | 111 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS }, |
112 { "1234qweras", | 112 { "1234qweras", |
113 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS }}, | 113 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS }}, |
114 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS, | 114 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS, |
115 PrefService::SYNCABLE_PREF, | 115 PrefServiceSyncable::SYNCABLE_PREF, |
116 }, | 116 }, |
117 }; | 117 }; |
118 COMPILE_ASSERT(kNumChewingMultipleChoicePrefs == | 118 COMPILE_ASSERT(kNumChewingMultipleChoicePrefs == |
119 arraysize(kChewingMultipleChoicePrefs), | 119 arraysize(kChewingMultipleChoicePrefs), |
120 TheSizeShouldMatch); | 120 TheSizeShouldMatch); |
121 | 121 |
122 const LanguageMultipleChoicePreference<int> kChewingHsuSelKeyType = { | 122 const LanguageMultipleChoicePreference<int> kChewingHsuSelKeyType = { |
123 prefs::kLanguageChewingHsuSelKeyType, | 123 prefs::kLanguageChewingHsuSelKeyType, |
124 1, | 124 1, |
125 "hsuSelKeyType", | 125 "hsuSelKeyType", |
126 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1 }, | 126 {{ 1, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_1 }, |
127 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2 }}, | 127 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE_2 }}, |
128 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE, | 128 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_HSU_SEL_KEY_TYPE, |
129 PrefService::SYNCABLE_PREF, | 129 PrefServiceSyncable::SYNCABLE_PREF, |
130 }; | 130 }; |
131 | 131 |
132 // --------------------------------------------------------------------------- | 132 // --------------------------------------------------------------------------- |
133 // For Korean input method (ibus-mozc-hangul) | 133 // For Korean input method (ibus-mozc-hangul) |
134 // --------------------------------------------------------------------------- | 134 // --------------------------------------------------------------------------- |
135 const char kHangulSectionName[] = "engine/Hangul"; | 135 const char kHangulSectionName[] = "engine/Hangul"; |
136 const char kHangulKeyboardConfigName[] = "HangulKeyboard"; | 136 const char kHangulKeyboardConfigName[] = "HangulKeyboard"; |
137 | 137 |
138 const char kHangulHanjaBindingKeysConfigName[] = "HanjaKeyBindings"; | 138 const char kHangulHanjaBindingKeysConfigName[] = "HanjaKeyBindings"; |
139 // Mozc-hangul treats Hangul_Hanja key as hanja key event even if it is not set. | 139 // Mozc-hangul treats Hangul_Hanja key as hanja key event even if it is not set. |
(...skipping 20 matching lines...) Expand all Loading... |
160 // --------------------------------------------------------------------------- | 160 // --------------------------------------------------------------------------- |
161 // For Simplified Chinese input method (ibus-mozc-pinyin) | 161 // For Simplified Chinese input method (ibus-mozc-pinyin) |
162 // --------------------------------------------------------------------------- | 162 // --------------------------------------------------------------------------- |
163 const char kPinyinSectionName[] = "engine/Pinyin"; | 163 const char kPinyinSectionName[] = "engine/Pinyin"; |
164 | 164 |
165 // We have to sync the |ibus_config_name|s with those in | 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. | 166 // ibus-mozc-pinyin/files/languages/pinyin/unix/ibus/config_updater.cc. |
167 const LanguageBooleanPrefs kPinyinBooleanPrefs[] = { | 167 const LanguageBooleanPrefs kPinyinBooleanPrefs[] = { |
168 { prefs::kLanguagePinyinCorrectPinyin, true, "CorrectPinyin", | 168 { prefs::kLanguagePinyinCorrectPinyin, true, "CorrectPinyin", |
169 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN, | 169 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_CORRECT_PINYIN, |
170 PrefService::SYNCABLE_PREF }, | 170 PrefServiceSyncable::SYNCABLE_PREF }, |
171 { prefs::kLanguagePinyinFuzzyPinyin, false, "FuzzyPinyin", | 171 { prefs::kLanguagePinyinFuzzyPinyin, false, "FuzzyPinyin", |
172 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN, | 172 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_FUZZY_PINYIN, |
173 PrefService::SYNCABLE_PREF }, | 173 PrefServiceSyncable::SYNCABLE_PREF }, |
174 { prefs::kLanguagePinyinShiftSelectCandidate, false, "ShiftSelectCandidate", | 174 { prefs::kLanguagePinyinShiftSelectCandidate, false, "ShiftSelectCandidate", |
175 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN, | 175 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_SHIFT_SELECT_PINYIN, |
176 PrefService::SYNCABLE_PREF }, | 176 PrefServiceSyncable::SYNCABLE_PREF }, |
177 { prefs::kLanguagePinyinMinusEqualPage, true, "MinusEqualPage", | 177 { prefs::kLanguagePinyinMinusEqualPage, true, "MinusEqualPage", |
178 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE, | 178 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_MINUS_EQUAL_PAGE, |
179 PrefService::SYNCABLE_PREF }, | 179 PrefServiceSyncable::SYNCABLE_PREF }, |
180 { prefs::kLanguagePinyinCommaPeriodPage, true, "CommaPeriodPage", | 180 { prefs::kLanguagePinyinCommaPeriodPage, true, "CommaPeriodPage", |
181 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE, | 181 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_COMMA_PERIOD_PAGE, |
182 PrefService::SYNCABLE_PREF }, | 182 PrefServiceSyncable::SYNCABLE_PREF }, |
183 { prefs::kLanguagePinyinAutoCommit, false, "AutoCommit", | 183 { prefs::kLanguagePinyinAutoCommit, false, "AutoCommit", |
184 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT, | 184 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_AUTO_COMMIT, |
185 PrefService::SYNCABLE_PREF }, | 185 PrefServiceSyncable::SYNCABLE_PREF }, |
186 { prefs::kLanguagePinyinDoublePinyin, false, "DoublePinyin", | 186 { prefs::kLanguagePinyinDoublePinyin, false, "DoublePinyin", |
187 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN, | 187 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_DOUBLE_PINYIN, |
188 PrefService::SYNCABLE_PREF }, | 188 PrefServiceSyncable::SYNCABLE_PREF }, |
189 { prefs::kLanguagePinyinInitChinese, true, "InitChinese", | 189 { prefs::kLanguagePinyinInitChinese, true, "InitChinese", |
190 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE, | 190 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_CHINESE, |
191 PrefService::SYNCABLE_PREF }, | 191 PrefServiceSyncable::SYNCABLE_PREF }, |
192 { prefs::kLanguagePinyinInitFull, false, "InitFull", | 192 { prefs::kLanguagePinyinInitFull, false, "InitFull", |
193 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL, | 193 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL, |
194 PrefService::SYNCABLE_PREF }, | 194 PrefServiceSyncable::SYNCABLE_PREF }, |
195 { prefs::kLanguagePinyinInitFullPunct, true, "InitFullPunct", | 195 { prefs::kLanguagePinyinInitFullPunct, true, "InitFullPunct", |
196 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT, | 196 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_FULL_PUNCT, |
197 PrefService::SYNCABLE_PREF }, | 197 PrefServiceSyncable::SYNCABLE_PREF }, |
198 { prefs::kLanguagePinyinInitSimplifiedChinese, true, "InitSimplifiedChinese", | 198 { prefs::kLanguagePinyinInitSimplifiedChinese, true, "InitSimplifiedChinese", |
199 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE, | 199 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTING_INIT_SIMPLIFIED_CHINESE, |
200 PrefService::SYNCABLE_PREF }, | 200 PrefServiceSyncable::SYNCABLE_PREF }, |
201 // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32 | 201 // TODO(yusukes): Support PINYIN_{INCOMPLETE,CORRECT,FUZZY}_... prefs (32 |
202 // additional boolean prefs.) | 202 // additional boolean prefs.) |
203 }; | 203 }; |
204 COMPILE_ASSERT(kNumPinyinBooleanPrefs == arraysize(kPinyinBooleanPrefs), | 204 COMPILE_ASSERT(kNumPinyinBooleanPrefs == arraysize(kPinyinBooleanPrefs), |
205 TheSizeShouldMatch); | 205 TheSizeShouldMatch); |
206 // TODO(yusukes): Support HalfWidthPuncts and IncompletePinyin prefs if needed. | 206 // TODO(yusukes): Support HalfWidthPuncts and IncompletePinyin prefs if needed. |
207 | 207 |
208 const LanguageMultipleChoicePreference<int> kPinyinDoublePinyinSchema = { | 208 const LanguageMultipleChoicePreference<int> kPinyinDoublePinyinSchema = { |
209 prefs::kLanguagePinyinDoublePinyinSchema, | 209 prefs::kLanguagePinyinDoublePinyinSchema, |
210 0, | 210 0, |
211 "DoublePinyinSchema", | 211 "DoublePinyinSchema", |
212 {{ 0, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_MSPY}, | 212 {{ 0, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_MSPY}, |
213 { 1, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZRM}, | 213 { 1, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZRM}, |
214 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ABC}, | 214 { 2, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ABC}, |
215 { 3, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZGPY}, | 215 { 3, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_ZGPY}, |
216 { 4, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_PYJJ}}, | 216 { 4, IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA_PYJJ}}, |
217 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA, | 217 IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_DOUBLE_SCHEMA, |
218 PrefService::SYNCABLE_PREF, | 218 PrefServiceSyncable::SYNCABLE_PREF, |
219 }; | 219 }; |
220 | 220 |
221 const PinyinIntegerPref kPinyinIntegerPrefs[] = { | 221 const PinyinIntegerPref kPinyinIntegerPrefs[] = { |
222 // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint. | 222 // TODO(yusukes): the type of lookup_table_page_size on ibus should be uint. |
223 { prefs::kLanguagePinyinLookupTablePageSize, 5, "LookupTablePageSize", | 223 { prefs::kLanguagePinyinLookupTablePageSize, |
224 PrefService::UNSYNCABLE_PREF } // don't sync as it's not user configurable. | 224 5, |
| 225 "LookupTablePageSize", |
| 226 |
| 227 // don't sync as it's not user configurable. |
| 228 PrefServiceSyncable::UNSYNCABLE_PREF } |
225 }; | 229 }; |
226 COMPILE_ASSERT(kNumPinyinIntegerPrefs == arraysize(kPinyinIntegerPrefs), | 230 COMPILE_ASSERT(kNumPinyinIntegerPrefs == arraysize(kPinyinIntegerPrefs), |
227 TheSizeShouldMatch); | 231 TheSizeShouldMatch); |
228 | 232 |
229 // --------------------------------------------------------------------------- | 233 // --------------------------------------------------------------------------- |
230 // For Japanese input method (ibus-mozc) | 234 // For Japanese input method (ibus-mozc) |
231 // --------------------------------------------------------------------------- | 235 // --------------------------------------------------------------------------- |
232 const char kMozcSectionName[] = "engine/Mozc"; | 236 const char kMozcSectionName[] = "engine/Mozc"; |
233 | 237 |
234 const LanguageBooleanPrefs kMozcBooleanPrefs[] = { | 238 const LanguageBooleanPrefs kMozcBooleanPrefs[] = { |
235 { prefs::kLanguageMozcIncognitoMode, | 239 { prefs::kLanguageMozcIncognitoMode, |
236 false, | 240 false, |
237 "incognito_mode", | 241 "incognito_mode", |
238 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_INCOGNITO_MODE, | 242 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_INCOGNITO_MODE, |
239 PrefService::SYNCABLE_PREF }, | 243 PrefServiceSyncable::SYNCABLE_PREF }, |
240 { prefs::kLanguageMozcUseAutoImeTurnOff, | 244 { prefs::kLanguageMozcUseAutoImeTurnOff, |
241 true, | 245 true, |
242 "use_auto_ime_turn_off", | 246 "use_auto_ime_turn_off", |
243 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_AUTO_IME_TURN_OFF, | 247 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_AUTO_IME_TURN_OFF, |
244 PrefService::SYNCABLE_PREF }, | 248 PrefServiceSyncable::SYNCABLE_PREF }, |
245 { prefs::kLanguageMozcUseHistorySuggest, | 249 { prefs::kLanguageMozcUseHistorySuggest, |
246 true, | 250 true, |
247 "use_history_suggest", | 251 "use_history_suggest", |
248 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_HISTORY_SUGGEST, | 252 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_HISTORY_SUGGEST, |
249 PrefService::SYNCABLE_PREF }, | 253 PrefServiceSyncable::SYNCABLE_PREF }, |
250 { prefs::kLanguageMozcUseDictionarySuggest, | 254 { prefs::kLanguageMozcUseDictionarySuggest, |
251 true, | 255 true, |
252 "use_dictionary_suggest", | 256 "use_dictionary_suggest", |
253 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_DICTIONARY_SUGGEST, | 257 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_USE_DICTIONARY_SUGGEST, |
254 PrefService::SYNCABLE_PREF }, | 258 PrefServiceSyncable::SYNCABLE_PREF }, |
255 }; | 259 }; |
256 COMPILE_ASSERT(kNumMozcBooleanPrefs == arraysize(kMozcBooleanPrefs), | 260 COMPILE_ASSERT(kNumMozcBooleanPrefs == arraysize(kMozcBooleanPrefs), |
257 TheSizeShouldMatch); | 261 TheSizeShouldMatch); |
258 | 262 |
259 extern const LanguageMultipleChoicePreference<const char*> | 263 extern const LanguageMultipleChoicePreference<const char*> |
260 kMozcMultipleChoicePrefs[] = { | 264 kMozcMultipleChoicePrefs[] = { |
261 { prefs::kLanguageMozcPreeditMethod, | 265 { prefs::kLanguageMozcPreeditMethod, |
262 "ROMAN", | 266 "ROMAN", |
263 "preedit_method", | 267 "preedit_method", |
264 {{ "ROMAN", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_ROMAN }, | 268 {{ "ROMAN", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_ROMAN }, |
265 { "KANA", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_KANA }}, | 269 { "KANA", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD_KANA }}, |
266 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD, | 270 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PREEDIT_METHOD, |
267 PrefService::SYNCABLE_PREF, | 271 PrefServiceSyncable::SYNCABLE_PREF, |
268 }, | 272 }, |
269 { prefs::kLanguageMozcSessionKeymap, | 273 { prefs::kLanguageMozcSessionKeymap, |
270 "MSIME", | 274 "MSIME", |
271 "session_keymap", | 275 "session_keymap", |
272 {{ "ATOK", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_ATOK }, | 276 {{ "ATOK", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_ATOK }, |
273 { "MSIME", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_MSIME }, | 277 { "MSIME", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_MSIME }, |
274 { "KOTOERI", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_KOTOERI }}, | 278 { "KOTOERI", IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP_KOTOERI }}, |
275 // TODO: Support "CUSTOM" keymap. | 279 // TODO: Support "CUSTOM" keymap. |
276 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP, | 280 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SESSION_KEYMAP, |
277 PrefService::SYNCABLE_PREF, | 281 PrefServiceSyncable::SYNCABLE_PREF, |
278 }, | 282 }, |
279 { prefs::kLanguageMozcPunctuationMethod, | 283 { prefs::kLanguageMozcPunctuationMethod, |
280 "KUTEN_TOUTEN", | 284 "KUTEN_TOUTEN", |
281 "punctuation_method", | 285 "punctuation_method", |
282 {{ "KUTEN_TOUTEN", | 286 {{ "KUTEN_TOUTEN", |
283 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_TOUTEN }, | 287 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_TOUTEN }, |
284 { "COMMA_PERIOD", | 288 { "COMMA_PERIOD", |
285 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_PERIOD }, | 289 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_PERIOD }, |
286 { "KUTEN_PERIOD", | 290 { "KUTEN_PERIOD", |
287 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_PERIOD }, | 291 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_KUTEN_PERIOD }, |
288 { "COMMA_TOUTEN", | 292 { "COMMA_TOUTEN", |
289 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_TOUTEN }}, | 293 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD_COMMA_TOUTEN }}, |
290 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD, | 294 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_PUNCTUATION_METHOD, |
291 PrefService::SYNCABLE_PREF, | 295 PrefServiceSyncable::SYNCABLE_PREF, |
292 }, | 296 }, |
293 { prefs::kLanguageMozcSymbolMethod, | 297 { prefs::kLanguageMozcSymbolMethod, |
294 "CORNER_BRACKET_MIDDLE_DOT", | 298 "CORNER_BRACKET_MIDDLE_DOT", |
295 "symbol_method", | 299 "symbol_method", |
296 {{ "CORNER_BRACKET_MIDDLE_DOT", | 300 {{ "CORNER_BRACKET_MIDDLE_DOT", |
297 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_MIDDLE_D
OT }, | 301 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_MIDDLE_D
OT }, |
298 { "SQUARE_BRACKET_SLASH", | 302 { "SQUARE_BRACKET_SLASH", |
299 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_SLASH }, | 303 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_SLASH }, |
300 { "CORNER_BRACKET_SLASH", | 304 { "CORNER_BRACKET_SLASH", |
301 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_SLASH }, | 305 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_CORNER_BRACKET_SLASH }, |
302 { "SQUARE_BRACKET_MIDDLE_DOT", | 306 { "SQUARE_BRACKET_MIDDLE_DOT", |
303 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_MIDDLE_D
OT }}, | 307 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD_SQUARE_BRACKET_MIDDLE_D
OT }}, |
304 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD, | 308 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD, |
305 PrefService::SYNCABLE_PREF, | 309 PrefServiceSyncable::SYNCABLE_PREF, |
306 }, | 310 }, |
307 { prefs::kLanguageMozcSpaceCharacterForm, | 311 { prefs::kLanguageMozcSpaceCharacterForm, |
308 "FUNDAMENTAL_INPUT_MODE", | 312 "FUNDAMENTAL_INPUT_MODE", |
309 "space_character_form", | 313 "space_character_form", |
310 {{ "FUNDAMENTAL_INPUT_MODE", | 314 {{ "FUNDAMENTAL_INPUT_MODE", |
311 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_INPU
T_MODE }, | 315 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_INPU
T_MODE }, |
312 { "FUNDAMENTAL_FULL_WIDTH", | 316 { "FUNDAMENTAL_FULL_WIDTH", |
313 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_FULL
_WIDTH }, | 317 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_FULL
_WIDTH }, |
314 { "FUNDAMENTAL_HALF_WIDTH", | 318 { "FUNDAMENTAL_HALF_WIDTH", |
315 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_HALF
_WIDTH }}, | 319 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM_FUNDAMENTAL_HALF
_WIDTH }}, |
316 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM, | 320 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SPACE_CHARACTER_FORM, |
317 PrefService::SYNCABLE_PREF, | 321 PrefServiceSyncable::SYNCABLE_PREF, |
318 }, | 322 }, |
319 { prefs::kLanguageMozcHistoryLearningLevel, | 323 { prefs::kLanguageMozcHistoryLearningLevel, |
320 "DEFAULT_HISTORY", | 324 "DEFAULT_HISTORY", |
321 "history_learning_level", | 325 "history_learning_level", |
322 {{ "DEFAULT_HISTORY", | 326 {{ "DEFAULT_HISTORY", |
323 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_DEFAULT_HISTOR
Y }, | 327 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_DEFAULT_HISTOR
Y }, |
324 { "READ_ONLY", | 328 { "READ_ONLY", |
325 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_READ_ONLY }, | 329 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_READ_ONLY }, |
326 { "NO_HISTORY", | 330 { "NO_HISTORY", |
327 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_NO_HISTORY }}, | 331 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL_NO_HISTORY }}, |
328 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL, | 332 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_HISTORY_LEARNING_LEVEL, |
329 PrefService::SYNCABLE_PREF, | 333 PrefServiceSyncable::SYNCABLE_PREF, |
330 }, | 334 }, |
331 // TODO(mazda): Uncomment this block once the candidate window in Chrome OS | 335 // TODO(mazda): Uncomment this block once the candidate window in Chrome OS |
332 // supports changing shortcut labels. | 336 // supports changing shortcut labels. |
333 // { prefs::kLanguageMozcSelectionShortcut, | 337 // { prefs::kLanguageMozcSelectionShortcut, |
334 // "SHORTCUT_123456789", | 338 // "SHORTCUT_123456789", |
335 // "selection_shortcut", | 339 // "selection_shortcut", |
336 // {{ "NO_SHORTCUT", | 340 // {{ "NO_SHORTCUT", |
337 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_NO_SHORTCUT }, | 341 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_NO_SHORTCUT }, |
338 // { "SHORTCUT_123456789", | 342 // { "SHORTCUT_123456789", |
339 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_123456
789 }, | 343 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_123456
789 }, |
340 // { "SHORTCUT_ASDFGHJKL", | 344 // { "SHORTCUT_ASDFGHJKL", |
341 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_ASDFGH
JKL }}, | 345 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT_SHORTCUT_ASDFGH
JKL }}, |
342 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT, | 346 // IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SELECTION_SHORTCUT, |
343 // PrefService::SYNCABLE_PREF, | 347 // PrefServiceSyncable::SYNCABLE_PREF, |
344 // }, | 348 // }, |
345 { prefs::kLanguageMozcShiftKeyModeSwitch, | 349 { prefs::kLanguageMozcShiftKeyModeSwitch, |
346 "ASCII_INPUT_MODE", | 350 "ASCII_INPUT_MODE", |
347 "shift_key_mode_switch", | 351 "shift_key_mode_switch", |
348 {{ "OFF", | 352 {{ "OFF", |
349 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_OFF }, | 353 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_OFF }, |
350 { "ASCII_INPUT_MODE", | 354 { "ASCII_INPUT_MODE", |
351 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_ASCII_INPUT_MOD
E }, | 355 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_ASCII_INPUT_MOD
E }, |
352 { "KATAKANA_INPUT_MODE", | 356 { "KATAKANA_INPUT_MODE", |
353 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_KATAKANA_INPUT_
MODE }}, | 357 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH_KATAKANA_INPUT_
MODE }}, |
354 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH, | 358 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SHIFT_KEY_MODE_SWITCH, |
355 PrefService::SYNCABLE_PREF, | 359 PrefServiceSyncable::SYNCABLE_PREF, |
356 }, | 360 }, |
357 { prefs::kLanguageMozcNumpadCharacterForm, | 361 { prefs::kLanguageMozcNumpadCharacterForm, |
358 "NUMPAD_HALF_WIDTH", | 362 "NUMPAD_HALF_WIDTH", |
359 "numpad_character_form", | 363 "numpad_character_form", |
360 {{ "NUMPAD_INPUT_MODE", | 364 {{ "NUMPAD_INPUT_MODE", |
361 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_INPUT_MO
DE }, | 365 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_INPUT_MO
DE }, |
362 { "NUMPAD_FULL_WIDTH", | 366 { "NUMPAD_FULL_WIDTH", |
363 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_FULL_WID
TH }, | 367 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_FULL_WID
TH }, |
364 { "NUMPAD_HALF_WIDTH", | 368 { "NUMPAD_HALF_WIDTH", |
365 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_HALF_WID
TH }, | 369 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_HALF_WID
TH }, |
366 { "NUMPAD_DIRECT_INPUT", | 370 { "NUMPAD_DIRECT_INPUT", |
367 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_DIRECT_I
NPUT }}, | 371 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM_NUMPAD_DIRECT_I
NPUT }}, |
368 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM, | 372 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_NUMPAD_CHARACTER_FORM, |
369 PrefService::SYNCABLE_PREF, | 373 PrefServiceSyncable::SYNCABLE_PREF, |
370 }, | 374 }, |
371 }; | 375 }; |
372 COMPILE_ASSERT(kNumMozcMultipleChoicePrefs == | 376 COMPILE_ASSERT(kNumMozcMultipleChoicePrefs == |
373 arraysize(kMozcMultipleChoicePrefs), | 377 arraysize(kMozcMultipleChoicePrefs), |
374 TheSizeShouldMatch); | 378 TheSizeShouldMatch); |
375 | 379 |
376 const LanguageIntegerRangePreference kMozcIntegerPrefs[] = { | 380 const LanguageIntegerRangePreference kMozcIntegerPrefs[] = { |
377 { prefs::kLanguageMozcSuggestionsSize, 3, 1, 9, "suggestions_size", | 381 { prefs::kLanguageMozcSuggestionsSize, 3, 1, 9, "suggestions_size", |
378 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SUGGESTIONS_SIZE, | 382 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SUGGESTIONS_SIZE, |
379 PrefService::SYNCABLE_PREF } | 383 PrefServiceSyncable::SYNCABLE_PREF } |
380 }; | 384 }; |
381 COMPILE_ASSERT(kNumMozcIntegerPrefs == arraysize(kMozcIntegerPrefs), | 385 COMPILE_ASSERT(kNumMozcIntegerPrefs == arraysize(kMozcIntegerPrefs), |
382 TheSizeShouldMatch); | 386 TheSizeShouldMatch); |
383 | 387 |
384 // --------------------------------------------------------------------------- | 388 // --------------------------------------------------------------------------- |
385 // For keyboard stuff | 389 // For keyboard stuff |
386 // --------------------------------------------------------------------------- | 390 // --------------------------------------------------------------------------- |
387 const int kXkbAutoRepeatDelayInMs = 500; | 391 const int kXkbAutoRepeatDelayInMs = 500; |
388 const int kXkbAutoRepeatIntervalInMs = 50; | 392 const int kXkbAutoRepeatIntervalInMs = 50; |
389 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout"; | 393 const char kPreferredKeyboardLayout[] = "PreferredKeyboardLayout"; |
390 | 394 |
391 void RegisterPrefs(PrefService* local_state) { | 395 void RegisterPrefs(PrefServiceSimple* local_state) { |
392 // We use an empty string here rather than a hardware keyboard layout name | 396 // We use an empty string here rather than a hardware keyboard layout name |
393 // since input_method::GetHardwareInputMethodId() might return a fallback | 397 // since input_method::GetHardwareInputMethodId() might return a fallback |
394 // layout name if local_state->RegisterStringPref(kHardwareKeyboardLayout) | 398 // layout name if local_state->RegisterStringPref(kHardwareKeyboardLayout) |
395 // is not called yet. | 399 // is not called yet. |
396 local_state->RegisterStringPref(kPreferredKeyboardLayout, | 400 local_state->RegisterStringPref(kPreferredKeyboardLayout, |
397 "", | 401 ""); |
398 PrefService::UNSYNCABLE_PREF); | |
399 } | 402 } |
400 | 403 |
401 } // namespace language_prefs | 404 } // namespace language_prefs |
402 } // namespace chromeos | 405 } // namespace chromeos |
OLD | NEW |