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 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/prefs/pref_member.h" | 12 #include "base/prefs/pref_member.h" |
13 #include "chrome/browser/chromeos/language_preferences.h" | 13 #include "chrome/browser/chromeos/language_preferences.h" |
14 #include "chrome/browser/prefs/pref_service_syncable_observer.h" | 14 #include "chrome/browser/prefs/pref_service_syncable_observer.h" |
15 | 15 |
16 class PrefRegistrySimple; | 16 class PrefRegistrySimple; |
17 class PrefRegistrySyncable; | |
18 class PrefService; | 17 class PrefService; |
19 class PrefServiceSyncable; | 18 class PrefServiceSyncable; |
20 | 19 |
| 20 namespace user_prefs { |
| 21 class PrefRegistrySyncable; |
| 22 } |
| 23 |
21 namespace chromeos { | 24 namespace chromeos { |
| 25 |
22 namespace input_method { | 26 namespace input_method { |
23 class InputMethodManager; | 27 class InputMethodManager; |
24 } // namespace input_method | 28 } |
25 | 29 |
26 // The Preferences class handles Chrome OS preferences. When the class | 30 // The Preferences class handles Chrome OS preferences. When the class |
27 // is first initialized, it will initialize the OS settings to what's stored in | 31 // is first initialized, it will initialize the OS settings to what's stored in |
28 // the preferences. These include touchpad settings, etc. | 32 // the preferences. These include touchpad settings, etc. |
29 // When the preferences change, we change the settings to reflect the new value. | 33 // When the preferences change, we change the settings to reflect the new value. |
30 class Preferences : public PrefServiceSyncableObserver { | 34 class Preferences : public PrefServiceSyncableObserver { |
31 public: | 35 public: |
32 Preferences(); | 36 Preferences(); |
33 explicit Preferences( | 37 explicit Preferences( |
34 input_method::InputMethodManager* input_method_manager); // for testing | 38 input_method::InputMethodManager* input_method_manager); // for testing |
35 virtual ~Preferences(); | 39 virtual ~Preferences(); |
36 | 40 |
37 // These method will register the prefs associated with Chrome OS settings. | 41 // These method will register the prefs associated with Chrome OS settings. |
38 static void RegisterPrefs(PrefRegistrySimple* registry); | 42 static void RegisterPrefs(PrefRegistrySimple* registry); |
39 static void RegisterUserPrefs(PrefRegistrySyncable* registry); | 43 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); |
40 | 44 |
41 // This method will initialize Chrome OS settings to values in user prefs. | 45 // This method will initialize Chrome OS settings to values in user prefs. |
42 void Init(PrefServiceSyncable* prefs); | 46 void Init(PrefServiceSyncable* prefs); |
43 | 47 |
44 void InitUserPrefsForTesting(PrefServiceSyncable* prefs); | 48 void InitUserPrefsForTesting(PrefServiceSyncable* prefs); |
45 void SetInputMethodListForTesting(); | 49 void SetInputMethodListForTesting(); |
46 | 50 |
47 private: | 51 private: |
48 // Initializes all member prefs. | 52 // Initializes all member prefs. |
49 void InitUserPrefs(PrefServiceSyncable* prefs); | 53 void InitUserPrefs(PrefServiceSyncable* prefs); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 BooleanPrefMember power_allow_screen_wake_locks_; | 185 BooleanPrefMember power_allow_screen_wake_locks_; |
182 DoublePrefMember power_presentation_idle_delay_factor_; | 186 DoublePrefMember power_presentation_idle_delay_factor_; |
183 DoublePrefMember power_user_activity_screen_dim_delay_factor_; | 187 DoublePrefMember power_user_activity_screen_dim_delay_factor_; |
184 | 188 |
185 DISALLOW_COPY_AND_ASSIGN(Preferences); | 189 DISALLOW_COPY_AND_ASSIGN(Preferences); |
186 }; | 190 }; |
187 | 191 |
188 } // namespace chromeos | 192 } // namespace chromeos |
189 | 193 |
190 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
OLD | NEW |