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/public/pref_member.h" | 12 #include "base/prefs/public/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 PrefRegistrySyncable; |
16 class PrefService; | 17 class PrefService; |
17 class PrefServiceSyncable; | 18 class PrefServiceSyncable; |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 namespace input_method { | 21 namespace input_method { |
21 class InputMethodManager; | 22 class InputMethodManager; |
22 } // namespace input_method | 23 } // namespace input_method |
23 | 24 |
24 // The Preferences class handles Chrome OS preferences. When the class | 25 // The Preferences class handles Chrome OS preferences. When the class |
25 // is first initialized, it will initialize the OS settings to what's stored in | 26 // is first initialized, it will initialize the OS settings to what's stored in |
26 // the preferences. These include touchpad settings, etc. | 27 // the preferences. These include touchpad settings, etc. |
27 // When the preferences change, we change the settings to reflect the new value. | 28 // When the preferences change, we change the settings to reflect the new value. |
28 class Preferences : public PrefServiceSyncableObserver { | 29 class Preferences : public PrefServiceSyncableObserver { |
29 public: | 30 public: |
30 Preferences(); | 31 Preferences(); |
31 explicit Preferences( | 32 explicit Preferences( |
32 input_method::InputMethodManager* input_method_manager); // for testing | 33 input_method::InputMethodManager* input_method_manager); // for testing |
33 virtual ~Preferences(); | 34 virtual ~Preferences(); |
34 | 35 |
35 // This method will register the prefs associated with Chrome OS settings. | 36 // This method will register the prefs associated with Chrome OS settings. |
36 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 37 static void RegisterUserPrefs(PrefService* prefs, |
| 38 PrefRegistrySyncable* registry); |
37 | 39 |
38 // This method will initialize Chrome OS settings to values in user prefs. | 40 // This method will initialize Chrome OS settings to values in user prefs. |
39 void Init(PrefServiceSyncable* prefs); | 41 void Init(PrefServiceSyncable* prefs); |
40 | 42 |
41 void InitUserPrefsForTesting(PrefServiceSyncable* prefs); | 43 void InitUserPrefsForTesting(PrefServiceSyncable* prefs); |
42 void SetInputMethodListForTesting(); | 44 void SetInputMethodListForTesting(); |
43 | 45 |
44 private: | 46 private: |
45 // Initializes all member prefs. | 47 // Initializes all member prefs. |
46 void InitUserPrefs(PrefServiceSyncable* prefs); | 48 void InitUserPrefs(PrefServiceSyncable* prefs); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 BooleanPrefMember power_use_audio_activity_; | 175 BooleanPrefMember power_use_audio_activity_; |
174 BooleanPrefMember power_use_video_activity_; | 176 BooleanPrefMember power_use_video_activity_; |
175 DoublePrefMember power_presentation_idle_delay_factor_; | 177 DoublePrefMember power_presentation_idle_delay_factor_; |
176 | 178 |
177 DISALLOW_COPY_AND_ASSIGN(Preferences); | 179 DISALLOW_COPY_AND_ASSIGN(Preferences); |
178 }; | 180 }; |
179 | 181 |
180 } // namespace chromeos | 182 } // namespace chromeos |
181 | 183 |
182 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ | 184 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
OLD | NEW |