summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/language_preferences.h
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 09:03:18 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-03 09:03:18 +0000
commit2a5cd8d6366d06553f025f4d49e8d22015821d77 (patch)
tree4250adb8e1797ec4759238288376d300c0f41bcc /chrome/browser/chromeos/language_preferences.h
parent817fc50713c37fb0cb41fbc455d83fb40b40da7e (diff)
downloadchromium_src-2a5cd8d6366d06553f025f4d49e8d22015821d77.zip
chromium_src-2a5cd8d6366d06553f025f4d49e8d22015821d77.tar.gz
chromium_src-2a5cd8d6366d06553f025f4d49e8d22015821d77.tar.bz2
Combine the combo box class used by mozc and chewing
BUG=none TEST=none Review URL: http://codereview.chromium.org/2558001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/language_preferences.h')
-rw-r--r--chrome/browser/chromeos/language_preferences.h45
1 files changed, 15 insertions, 30 deletions
diff --git a/chrome/browser/chromeos/language_preferences.h b/chrome/browser/chromeos/language_preferences.h
index 6674a7b..b4b567d 100644
--- a/chrome/browser/chromeos/language_preferences.h
+++ b/chrome/browser/chromeos/language_preferences.h
@@ -12,6 +12,19 @@
// Section and config names for the IBus configuration daemon.
namespace chromeos {
+struct LanguageMultipleChoicePreference {
+ const wchar_t* pref_name; // Chrome preference name.
+ const wchar_t* default_pref_value;
+ const char* ibus_config_name;
+ // Currently we have 10 combobox items at most.
+ static const size_t kMaxItems = 10;
+ struct {
+ const char* ibus_config_value;
+ int item_message_id; // Resource grd ID for the combobox item.
+ } values_and_ids[kMaxItems];
+ int label_message_id; // Resource grd ID for the label.
+};
+
// For ibus-daemon
const char kGeneralSectionName[] = "general";
const char kHotKeySectionName[] = "general/hotkey";
@@ -80,19 +93,7 @@ const struct {
};
const size_t kNumChewingIntegerPrefs = ARRAYSIZE_UNSAFE(kChewingIntegerPrefs);
-const struct ChewingMultipleChoicePreference {
- const wchar_t* pref_name; // Chrome preference name.
- const wchar_t* default_pref_value;
- const char* ibus_config_name;
- // Currently we have 10 combobox items at most.
- static const size_t kMaxItems = 10;
- struct {
- const char* ibus_config_value;
- int item_message_id; // Resource grd ID for the combobox item.
- } values_and_ids[kMaxItems];
- int label_message_id; // Resource grd ID for the label.
-
-} kChewingMultipleChoicePrefs[] = {
+const LanguageMultipleChoicePreference kChewingMultipleChoicePrefs[] = {
{ prefs::kLanguageChewingKeyboardType,
L"default",
"KBType",
@@ -213,23 +214,7 @@ const size_t kNumPinyinIntegerPrefs = ARRAYSIZE_UNSAFE(kPinyinIntegerPrefs);
// For Japanese input method (ibus-mozc)
const char kMozcSectionName[] = "engine/Mozc";
-const struct MozcMultipleChoicePreference {
- const wchar_t* pref_name; // Chrome preference name.
- const wchar_t* default_pref_value;
- // The config names and values have to be matched with protobuf member names
- // in chromiumos/src/third_party/ibus-mozc/files/src/session/config.proto
- // since ibus-mozc uses protobuf reflection APIs to pass prefs to the Mozc
- // Japanese converter.
- const char* ibus_config_name;
- // Currently we have 4 combobox items at most.
- static const size_t kMaxItems = 4;
- struct {
- const char* ibus_config_value;
- int item_message_id; // Resource grd ID for the combobox item.
- } values_and_ids[kMaxItems];
- int label_message_id; // Resource grd ID for the label.
-
-} kMozcMultipleChoicePrefs[] = {
+const LanguageMultipleChoicePreference kMozcMultipleChoicePrefs[] = {
{ prefs::kLanguageMozcPreeditMethod,
L"ROMAN",
"preedit_method",