summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/preferences.h
diff options
context:
space:
mode:
authorchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 21:08:29 +0000
committerchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 21:08:29 +0000
commitfecc1520c83dc037865ba49846f764ce056d4016 (patch)
tree54be637f39785fda3046ca0a276be1ceba2c9999 /chrome/browser/chromeos/preferences.h
parent40c2a7869363f42ab82b48bd5d4cb1a776cd2809 (diff)
downloadchromium_src-fecc1520c83dc037865ba49846f764ce056d4016.zip
chromium_src-fecc1520c83dc037865ba49846f764ce056d4016.tar.gz
chromium_src-fecc1520c83dc037865ba49846f764ce056d4016.tar.bz2
Add UI for changing timezones.
BUG=24876 TEST=none Review URL: http://codereview.chromium.org/267113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29183 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/preferences.h')
-rw-r--r--chrome/browser/chromeos/preferences.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h
new file mode 100644
index 0000000..b4a01be
--- /dev/null
+++ b/chrome/browser/chromeos/preferences.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_PREFERENCES_H_
+#define CHROME_BROWSER_CHROMEOS_PREFERENCES_H_
+
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/pref_member.h"
+
+class PrefService;
+
+namespace chromeos {
+
+// The Preferences class handles Chrome OS preferences. When the class
+// is first initialized, it will initialize the OS settings to what's stored in
+// the preferences. These include timezones, touchpad settings, etc.
+// When the preferences change, we change the settings to reflect the new value.
+class Preferences : public NotificationObserver {
+ public:
+ Preferences() {}
+ virtual ~Preferences() {}
+
+ // This method will register the prefs associated with Chrome OS settings.
+ static void RegisterUserPrefs(PrefService* prefs);
+
+ // This method will initialize Chrome OS settings to values in user prefs.
+ void Init(PrefService* prefs);
+
+ // Overridden from NotificationObserver:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ protected:
+ // This will set the OS settings when the preference changes.
+ // If this method is called with NULL, it will set all OS settings to what's
+ // stored in the preferences.
+ virtual void NotifyPrefChanged(const std::wstring* pref_name);
+
+ private:
+ void SetTimeZone(const std::wstring& id);
+
+ StringPrefMember timezone_;
+ BooleanPrefMember tap_to_click_enabled_;
+ BooleanPrefMember vert_edge_scroll_enabled_;
+ IntegerPrefMember speed_factor_;
+ IntegerPrefMember sensitivity_;
+
+ DISALLOW_COPY_AND_ASSIGN(Preferences);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_PREFERENCES_H_