Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Side by Side Diff: chrome/browser/chromeos/language_preferences.cc

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

Powered by Google App Engine
This is Rietveld 408576698