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_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // A variant of SetLanguageConfigStringList. You can pass comma-separated | 81 // A variant of SetLanguageConfigStringList. You can pass comma-separated |
82 // values. Examples of |value|: "", "Control+space,Hiragana" | 82 // values. Examples of |value|: "", "Control+space,Hiragana" |
83 void SetLanguageConfigStringListAsCSV(const char* section, | 83 void SetLanguageConfigStringListAsCSV(const char* section, |
84 const char* name, | 84 const char* name, |
85 const std::string& value); | 85 const std::string& value); |
86 | 86 |
87 // Restores the user's preferred input method / keyboard layout on signing in. | 87 // Restores the user's preferred input method / keyboard layout on signing in. |
88 void SetInputMethodList(); | 88 void SetInputMethodList(); |
89 | 89 |
| 90 // Parses and applies the local extension IME pref. |
| 91 void SetEnabledExtensionImes(); |
| 92 |
| 93 // Copies local language and input method prefs to their global counterparts. |
| 94 void SetSyncedLocalePrefs(); |
| 95 |
90 // Updates the initial key repeat delay and key repeat interval following | 96 // Updates the initial key repeat delay and key repeat interval following |
91 // current prefs values. We set the delay and interval at once since an | 97 // current prefs values. We set the delay and interval at once since an |
92 // underlying XKB API requires it. | 98 // underlying XKB API requires it. |
93 void UpdateAutoRepeatRate(); | 99 void UpdateAutoRepeatRate(); |
94 | 100 |
95 // Force natural scroll to on if --enable-natural-scroll-default is specified | 101 // Force natural scroll to on if --enable-natural-scroll-default is specified |
96 // on the cmd line. | 102 // on the cmd line. |
97 void ForceNaturalScrollDefault(); | 103 void ForceNaturalScrollDefault(); |
98 | 104 |
99 // PrefServiceSyncableObserver implementation. | 105 // PrefServiceSyncableObserver implementation. |
(...skipping 17 matching lines...) Expand all Loading... |
117 BooleanPrefMember natural_scroll_; | 123 BooleanPrefMember natural_scroll_; |
118 BooleanPrefMember vert_edge_scroll_enabled_; | 124 BooleanPrefMember vert_edge_scroll_enabled_; |
119 IntegerPrefMember speed_factor_; | 125 IntegerPrefMember speed_factor_; |
120 IntegerPrefMember mouse_sensitivity_; | 126 IntegerPrefMember mouse_sensitivity_; |
121 IntegerPrefMember touchpad_sensitivity_; | 127 IntegerPrefMember touchpad_sensitivity_; |
122 BooleanPrefMember primary_mouse_button_right_; | 128 BooleanPrefMember primary_mouse_button_right_; |
123 FilePathPrefMember download_default_directory_; | 129 FilePathPrefMember download_default_directory_; |
124 BooleanPrefMember touch_hud_projection_enabled_; | 130 BooleanPrefMember touch_hud_projection_enabled_; |
125 | 131 |
126 // Input method preferences. | 132 // Input method preferences. |
127 StringPrefMember preload_engines_; | |
128 StringPrefMember current_input_method_; | |
129 StringPrefMember previous_input_method_; | 133 StringPrefMember previous_input_method_; |
130 StringPrefMember enabled_extension_imes_; | 134 StringPrefMember enabled_extension_imes_; |
| 135 // Only apply the local variants to the device settings, since the user may |
| 136 // have different hardware keyboards on their devices. We only use the global |
| 137 // variants to note the user's most recent choices, and in the initial |
| 138 // post-OOBE sync, we add the global most recent choices to the local values. |
| 139 // This never affects existing profiles. |
| 140 StringPrefMember preferred_languages_; |
| 141 StringPrefMember preferred_languages_local_; |
| 142 StringPrefMember preload_engines_; |
| 143 StringPrefMember preload_engines_local_; |
| 144 StringPrefMember current_input_method_; |
| 145 StringPrefMember enabled_extension_imes_local_; |
| 146 |
| 147 // Whether the global language/input method prefs should be merged into the |
| 148 // local settings for this device. False if we have ever synced. |
| 149 bool should_merge_locale_prefs_; |
131 | 150 |
132 BooleanPrefMember xkb_auto_repeat_enabled_; | 151 BooleanPrefMember xkb_auto_repeat_enabled_; |
133 IntegerPrefMember xkb_auto_repeat_delay_pref_; | 152 IntegerPrefMember xkb_auto_repeat_delay_pref_; |
134 IntegerPrefMember xkb_auto_repeat_interval_pref_; | 153 IntegerPrefMember xkb_auto_repeat_interval_pref_; |
135 | 154 |
136 // User owning these preferences. | 155 // User owning these preferences. |
137 const User* user_; | 156 const User* user_; |
138 | 157 |
139 // Whether user is a primary user. | 158 // Whether user is a primary user. |
140 bool user_is_primary_; | 159 bool user_is_primary_; |
141 | 160 |
142 DISALLOW_COPY_AND_ASSIGN(Preferences); | 161 DISALLOW_COPY_AND_ASSIGN(Preferences); |
143 }; | 162 }; |
144 | 163 |
145 } // namespace chromeos | 164 } // namespace chromeos |
146 | 165 |
147 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ | 166 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
OLD | NEW |