OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH}, | 58 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_FORCE_LOWER_CASE_ENGLISH}, |
59 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin", | 59 { prefs::kLanguageChewingPlainZhuyin, false, "plainZhuyin", |
60 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN}, | 60 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PLAIN_ZHUYIN}, |
61 { prefs::kLanguageChewingPhraseChoiceRearward, true, "phraseChoiceRearward", | 61 { prefs::kLanguageChewingPhraseChoiceRearward, true, "phraseChoiceRearward", |
62 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD}, | 62 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_PHRASE_CHOICE_REARWARD}, |
63 { prefs::kLanguageChewingSpaceAsSelection, true, "spaceAsSelection", | 63 { prefs::kLanguageChewingSpaceAsSelection, true, "spaceAsSelection", |
64 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION}, | 64 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_SPACE_AS_SELECTION}, |
65 }; | 65 }; |
66 const size_t kNumChewingBooleanPrefs = ARRAYSIZE_UNSAFE(kChewingBooleanPrefs); | 66 const size_t kNumChewingBooleanPrefs = ARRAYSIZE_UNSAFE(kChewingBooleanPrefs); |
67 | 67 |
| 68 const struct { |
| 69 const wchar_t* pref_name; // Chrome preference name. |
| 70 int default_pref_value; |
| 71 int min_pref_value; |
| 72 int max_pref_value; |
| 73 const char* ibus_config_name; |
| 74 int message_id; |
| 75 } kChewingIntegerPrefs[] = { |
| 76 { prefs::kLanguageChewingMaxChiSymbolLen, 20, 8, 40, "maxChiSymbolLen", |
| 77 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_MAX_CHI_SYMBOL_LEN}, |
| 78 { prefs::kLanguageChewingCandPerPage, 10, 8, 10, "candPerPage", |
| 79 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTING_CAND_PER_PAGE}, |
| 80 }; |
| 81 const size_t kNumChewingIntegerPrefs = ARRAYSIZE_UNSAFE(kChewingIntegerPrefs); |
| 82 |
68 const struct ChewingMultipleChoicePreference { | 83 const struct ChewingMultipleChoicePreference { |
69 const wchar_t* pref_name; // Chrome preference name. | 84 const wchar_t* pref_name; // Chrome preference name. |
70 const wchar_t* default_pref_value; | 85 const wchar_t* default_pref_value; |
71 const char* ibus_config_name; | 86 const char* ibus_config_name; |
72 // Currently we have 10 combobox items at most. | 87 // Currently we have 10 combobox items at most. |
73 static const size_t kMaxItems = 10; | 88 static const size_t kMaxItems = 10; |
74 struct { | 89 struct { |
75 const char* ibus_config_value; | 90 const char* ibus_config_value; |
76 int item_message_id; // Resource grd ID for the combobox item. | 91 int item_message_id; // Resource grd ID for the combobox item. |
77 } values_and_ids[kMaxItems]; | 92 } values_and_ids[kMaxItems]; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID }, | 129 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUHTNSID }, |
115 { "aoeuidhtns", | 130 { "aoeuidhtns", |
116 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS }, | 131 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_AOEUIDHTNS }, |
117 { "1234qweras", | 132 { "1234qweras", |
118 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS }}, | 133 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS_1234QWERAS }}, |
119 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS, | 134 IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SEL_KEYS, |
120 }, | 135 }, |
121 }; | 136 }; |
122 const size_t kNumChewingMultipleChoicePrefs = | 137 const size_t kNumChewingMultipleChoicePrefs = |
123 arraysize(kChewingMultipleChoicePrefs); | 138 arraysize(kChewingMultipleChoicePrefs); |
124 // TODO(zork): Support candPerPage, hsuSelKeyType, and maxChiSymbolLen | 139 // TODO(zork): Support hsuSelKeyType |
125 | 140 |
126 // For Korean input method (ibus-hangul) | 141 // For Korean input method (ibus-hangul) |
127 const char kHangulSectionName[] = "engine/Hangul"; | 142 const char kHangulSectionName[] = "engine/Hangul"; |
128 const char kHangulKeyboardConfigName[] = "HangulKeyboard"; | 143 const char kHangulKeyboardConfigName[] = "HangulKeyboard"; |
129 | 144 |
130 const struct HangulKeyboardNameIDPair { | 145 const struct HangulKeyboardNameIDPair { |
131 int message_id; | 146 int message_id; |
132 const wchar_t* keyboard_id; | 147 const wchar_t* keyboard_id; |
133 } kHangulKeyboardNameIDPairs[] = { | 148 } kHangulKeyboardNameIDPairs[] = { |
134 // We have to sync the |keyboard_id|s with those in | 149 // We have to sync the |keyboard_id|s with those in |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD, | 273 IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SYMBOL_METHOD, |
259 }, | 274 }, |
260 }; | 275 }; |
261 const size_t kNumMozcMultipleChoicePrefs = arraysize(kMozcMultipleChoicePrefs); | 276 const size_t kNumMozcMultipleChoicePrefs = arraysize(kMozcMultipleChoicePrefs); |
262 | 277 |
263 // For Traditional Chinese input methods (ibus-pinyin-bopomofo and ibus-chewing) | 278 // For Traditional Chinese input methods (ibus-pinyin-bopomofo and ibus-chewing) |
264 // TODO(yusukes): Add constants for Traditional Chinese input methods. | 279 // TODO(yusukes): Add constants for Traditional Chinese input methods. |
265 } // chromeos | 280 } // chromeos |
266 | 281 |
267 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ | 282 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ |
OLD | NEW |