OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/compiler_specific.h" |
12 #include "chrome/browser/chromeos/language_preferences.h" | 13 #include "chrome/browser/chromeos/language_preferences.h" |
13 #include "chrome/browser/prefs/pref_member.h" | 14 #include "chrome/browser/prefs/pref_member.h" |
14 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
15 | 16 |
16 class PrefService; | 17 class PrefService; |
17 | 18 |
18 namespace chromeos { | 19 namespace chromeos { |
19 | 20 |
20 // The Preferences class handles Chrome OS preferences. When the class | 21 // The Preferences class handles Chrome OS preferences. When the class |
21 // is first initialized, it will initialize the OS settings to what's stored in | 22 // is first initialized, it will initialize the OS settings to what's stored in |
(...skipping 10 matching lines...) Expand all Loading... |
32 // This method is called when kLanguagePreferredVirtualKeyboard is updated to | 33 // This method is called when kLanguagePreferredVirtualKeyboard is updated to |
33 // change the virtual keyboard settings to reflect the new value. | 34 // change the virtual keyboard settings to reflect the new value. |
34 static void UpdateVirturalKeyboardPreference(PrefService* prefs); | 35 static void UpdateVirturalKeyboardPreference(PrefService* prefs); |
35 | 36 |
36 // This method will initialize Chrome OS settings to values in user prefs. | 37 // This method will initialize Chrome OS settings to values in user prefs. |
37 void Init(PrefService* prefs); | 38 void Init(PrefService* prefs); |
38 | 39 |
39 // Overridden from content::NotificationObserver: | 40 // Overridden from content::NotificationObserver: |
40 virtual void Observe(int type, | 41 virtual void Observe(int type, |
41 const content::NotificationSource& source, | 42 const content::NotificationSource& source, |
42 const content::NotificationDetails& details); | 43 const content::NotificationDetails& details) OVERRIDE; |
43 | 44 |
44 private: | 45 private: |
45 // This will set the OS settings when the preference changes. | 46 // This will set the OS settings when the preference changes. |
46 // If this method is called with NULL, it will set all OS settings to what's | 47 // If this method is called with NULL, it will set all OS settings to what's |
47 // stored in the preferences. | 48 // stored in the preferences. |
48 void NotifyPrefChanged(const std::string* pref_name); | 49 void NotifyPrefChanged(const std::string* pref_name); |
49 | 50 |
50 // Writes boolean |value| to the input method (IBus) configuration daemon. | 51 // Writes boolean |value| to the input method (IBus) configuration daemon. |
51 // |section| (e.g. "general") and |name| (e.g. "use_global_engine") should | 52 // |section| (e.g. "general") and |name| (e.g. "use_global_engine") should |
52 // not be NULL. | 53 // not be NULL. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 IntegerPrefMember language_xkb_auto_repeat_interval_pref_; | 128 IntegerPrefMember language_xkb_auto_repeat_interval_pref_; |
128 | 129 |
129 BooleanPrefMember enable_screen_lock_; | 130 BooleanPrefMember enable_screen_lock_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(Preferences); | 132 DISALLOW_COPY_AND_ASSIGN(Preferences); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace chromeos | 135 } // namespace chromeos |
135 | 136 |
136 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ | 137 #endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_ |
OLD | NEW |