| 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 #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 <stddef.h> // For size_t | 8 #include <stddef.h> // For size_t |
| 9 | 9 |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const char* pref_name; // Chrome preference name. | 29 const char* pref_name; // Chrome preference name. |
| 30 DataType default_pref_value; | 30 DataType default_pref_value; |
| 31 const char* ibus_config_name; | 31 const char* ibus_config_name; |
| 32 // Currently we have 10 combobox items at most. | 32 // Currently we have 10 combobox items at most. |
| 33 static const size_t kMaxItems = 11; | 33 static const size_t kMaxItems = 11; |
| 34 struct { | 34 struct { |
| 35 DataType ibus_config_value; | 35 DataType ibus_config_value; |
| 36 int item_message_id; // Resource grd ID for the combobox item. | 36 int item_message_id; // Resource grd ID for the combobox item. |
| 37 } values_and_ids[kMaxItems]; | 37 } values_and_ids[kMaxItems]; |
| 38 int label_message_id; // Resource grd ID for the label. | 38 int label_message_id; // Resource grd ID for the label. |
| 39 PrefService::PrefSyncStatus sync_status; | 39 PrefServiceSyncable::PrefSyncStatus sync_status; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 // The struct is used for preferences of boolean values, like switches to | 42 // The struct is used for preferences of boolean values, like switches to |
| 43 // enable or disable particular features. | 43 // enable or disable particular features. |
| 44 struct LanguageBooleanPrefs { | 44 struct LanguageBooleanPrefs { |
| 45 const char* pref_name; // Chrome preference name. | 45 const char* pref_name; // Chrome preference name. |
| 46 bool default_pref_value; | 46 bool default_pref_value; |
| 47 const char* ibus_config_name; | 47 const char* ibus_config_name; |
| 48 int message_id; | 48 int message_id; |
| 49 PrefService::PrefSyncStatus sync_status; | 49 PrefServiceSyncable::PrefSyncStatus sync_status; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // The struct is used for preferences of integer range values, like the | 52 // The struct is used for preferences of integer range values, like the |
| 53 // key repeat rate. | 53 // key repeat rate. |
| 54 struct LanguageIntegerRangePreference { | 54 struct LanguageIntegerRangePreference { |
| 55 const char* pref_name; // Chrome preference name. | 55 const char* pref_name; // Chrome preference name. |
| 56 int default_pref_value; | 56 int default_pref_value; |
| 57 int min_pref_value; | 57 int min_pref_value; |
| 58 int max_pref_value; | 58 int max_pref_value; |
| 59 const char* ibus_config_name; | 59 const char* ibus_config_name; |
| 60 int message_id; | 60 int message_id; |
| 61 PrefService::PrefSyncStatus sync_status; | 61 PrefServiceSyncable::PrefSyncStatus sync_status; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // --------------------------------------------------------------------------- | 64 // --------------------------------------------------------------------------- |
| 65 // For ibus-daemon | 65 // For ibus-daemon |
| 66 // --------------------------------------------------------------------------- | 66 // --------------------------------------------------------------------------- |
| 67 extern const char kGeneralSectionName[]; | 67 extern const char kGeneralSectionName[]; |
| 68 extern const char kPreloadEnginesConfigName[]; | 68 extern const char kPreloadEnginesConfigName[]; |
| 69 | 69 |
| 70 // --------------------------------------------------------------------------- | 70 // --------------------------------------------------------------------------- |
| 71 // For Traditional Chinese input method (ibus-mozc-chewing) | 71 // For Traditional Chinese input method (ibus-mozc-chewing) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 extern const LanguageBooleanPrefs kPinyinBooleanPrefs[]; | 116 extern const LanguageBooleanPrefs kPinyinBooleanPrefs[]; |
| 117 // See comments at kNumChewingBooleanPrefs for why we hard-code this here. | 117 // See comments at kNumChewingBooleanPrefs for why we hard-code this here. |
| 118 const size_t kNumPinyinBooleanPrefs = 11; | 118 const size_t kNumPinyinBooleanPrefs = 11; |
| 119 | 119 |
| 120 extern const LanguageMultipleChoicePreference<int> kPinyinDoublePinyinSchema; | 120 extern const LanguageMultipleChoicePreference<int> kPinyinDoublePinyinSchema; |
| 121 | 121 |
| 122 struct PinyinIntegerPref { | 122 struct PinyinIntegerPref { |
| 123 const char* pref_name; // Chrome preference name. | 123 const char* pref_name; // Chrome preference name. |
| 124 int default_pref_value; | 124 int default_pref_value; |
| 125 const char* ibus_config_name; | 125 const char* ibus_config_name; |
| 126 PrefService::PrefSyncStatus sync_status; | 126 PrefServiceSyncable::PrefSyncStatus sync_status; |
| 127 // TODO(yusukes): Add message_id if needed. | 127 // TODO(yusukes): Add message_id if needed. |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 extern const PinyinIntegerPref kPinyinIntegerPrefs[]; | 130 extern const PinyinIntegerPref kPinyinIntegerPrefs[]; |
| 131 const size_t kNumPinyinIntegerPrefs = 1; | 131 const size_t kNumPinyinIntegerPrefs = 1; |
| 132 | 132 |
| 133 // --------------------------------------------------------------------------- | 133 // --------------------------------------------------------------------------- |
| 134 // For Japanese input method (ibus-mozc) | 134 // For Japanese input method (ibus-mozc) |
| 135 // --------------------------------------------------------------------------- | 135 // --------------------------------------------------------------------------- |
| 136 extern const char kMozcSectionName[]; | 136 extern const char kMozcSectionName[]; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 154 // A delay between the first and the start of the rest. | 154 // A delay between the first and the start of the rest. |
| 155 extern const int kXkbAutoRepeatDelayInMs; | 155 extern const int kXkbAutoRepeatDelayInMs; |
| 156 // An interval between the repeated keys. | 156 // An interval between the repeated keys. |
| 157 extern const int kXkbAutoRepeatIntervalInMs; | 157 extern const int kXkbAutoRepeatIntervalInMs; |
| 158 | 158 |
| 159 // A string Chrome preference (Local State) of the preferred keyboard layout in | 159 // A string Chrome preference (Local State) of the preferred keyboard layout in |
| 160 // the login screen. | 160 // the login screen. |
| 161 extern const char kPreferredKeyboardLayout[]; | 161 extern const char kPreferredKeyboardLayout[]; |
| 162 | 162 |
| 163 // Registers non-user prefs for the default keyboard layout on the login screen. | 163 // Registers non-user prefs for the default keyboard layout on the login screen. |
| 164 void RegisterPrefs(PrefService* local_state); | 164 void RegisterPrefs(PrefServiceSimple* local_state); |
| 165 | 165 |
| 166 } // language_prefs | 166 } // language_prefs |
| 167 } // chromeos | 167 } // chromeos |
| 168 | 168 |
| 169 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ | 169 #endif // CHROME_BROWSER_CHROMEOS_LANGUAGE_PREFERENCES_H_ |
| OLD | NEW |