diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 20:21:53 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 20:21:53 +0000 |
commit | 2627431bef905332e55a90960aed8049b681689f (patch) | |
tree | 4d15c42eb95a48241e2bc9a109bbb77c3eafad00 /chrome/browser | |
parent | d328413b739ed1150369743a64cacfb167086a32 (diff) | |
download | chromium_src-2627431bef905332e55a90960aed8049b681689f.zip chromium_src-2627431bef905332e55a90960aed8049b681689f.tar.gz chromium_src-2627431bef905332e55a90960aed8049b681689f.tar.bz2 |
Lands http://codereview.chromium.org/193032 for Charlie:
First pass at adding ChromeOS settings
- a mock wifi selector combobox
- touchpad settings that makes calls to synclient
- on startup, touchpad settings are initialized to what's stored in
preferences
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/203073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/settings_page_view.cc | 7 | ||||
-rw-r--r-- | chrome/browser/chromeos/settings_page_view.h | 7 | ||||
-rw-r--r-- | chrome/browser/options_util.cc | 4 | ||||
-rw-r--r-- | chrome/browser/profile.cc | 14 | ||||
-rw-r--r-- | chrome/browser/profile.h | 8 |
5 files changed, 36 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/settings_page_view.cc b/chrome/browser/chromeos/settings_page_view.cc index bfbb46f..9c19c34 100644 --- a/chrome/browser/chromeos/settings_page_view.cc +++ b/chrome/browser/chromeos/settings_page_view.cc @@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/settings_page_view.h" +#include "chrome/browser/chromeos/settings_contents_view.h" #include "views/controls/label.h" #include "views/fill_layout.h" #include "views/widget/widget_gtk.h" @@ -29,7 +30,7 @@ GtkWidget* SettingsPageView::WrapInGtkWidget() { } void SettingsPageView::InitControlLayout() { - // Remove this and add the real views we want. We'll likely need to make this - // scrollable as well. - AddChildView(new views::Label(L"Implement me")); + // We'll likely need to make this scrollable + settings_contents_view_ = new SettingsContentsView(profile()); + AddChildView(settings_contents_view_); } diff --git a/chrome/browser/chromeos/settings_page_view.h b/chrome/browser/chromeos/settings_page_view.h index b512fea..3d7004d 100644 --- a/chrome/browser/chromeos/settings_page_view.h +++ b/chrome/browser/chromeos/settings_page_view.h @@ -5,9 +5,11 @@ #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_PAGE_VIEW_H_ #define CHROME_BROWSER_CHROMEOS_SETTINGS_PAGE_VIEW_H_ +#include <gtk/gtk.h> + #include "chrome/browser/views/options/options_page_view.h" -#include <gtk/gtk.h> +class SettingsContentsView; // Settings page for Chrome OS. class SettingsPageView : public OptionsPageView { @@ -23,6 +25,9 @@ class SettingsPageView : public OptionsPageView { virtual void InitControlLayout(); private: + // Controls for the Settings page + SettingsContentsView* settings_contents_view_; + DISALLOW_COPY_AND_ASSIGN(SettingsPageView); }; diff --git a/chrome/browser/options_util.cc b/chrome/browser/options_util.cc index fe985de..fe588cb 100644 --- a/chrome/browser/options_util.cc +++ b/chrome/browser/options_util.cc @@ -30,6 +30,10 @@ void OptionsUtil::ResetToDefaults(Profile* profile) { prefs::kSSL3Enabled, prefs::kTLS1Enabled, #endif +#if defined(OS_CHROMEOS) + prefs::kTapToClickEnabled, + prefs::kVertEdgeScrollEnabled, +#endif prefs::kDownloadDefaultDirectory, prefs::kDownloadExtensionsToOpen, prefs::kEnableSpellCheck, diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index de7f949..85b809b 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -57,6 +57,10 @@ #include "chrome/browser/gtk/gtk_theme_provider.h" #endif +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/touchpad.h" +#endif + using base::Time; using base::TimeDelta; @@ -597,6 +601,10 @@ ProfileImpl::ProfileImpl(const FilePath& path) ssl_config_service_manager_.reset( SSLConfigServiceManager::CreateDefaultManager(this)); + +#if defined(OS_CHROMEOS) + touchpad_.Init(prefs); +#endif } void ProfileImpl::InitExtensions() { @@ -849,6 +857,12 @@ PrefService* ProfileImpl::GetPrefs() { // register known prefs as soon as possible. Profile::RegisterUserPrefs(prefs_.get()); ProfileManager::RegisterUserPrefs(prefs_.get()); +#if defined(OS_CHROMEOS) + // Register Touchpad prefs here instead of in browser_prefs because these + // prefs are used in the constructor of ProfileImpl which happens before + // browser_prefs' RegisterAllPrefs is called. + Touchpad::RegisterUserPrefs(prefs_.get()); +#endif // The last session exited cleanly if there is no pref for // kSessionExitedCleanly or the value for kSessionExitedCleanly is true. diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index 1769ec8..ba4dd87 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -18,6 +18,10 @@ #include "chrome/browser/web_resource/web_resource_service.h" #include "chrome/common/notification_registrar.h" +#if defined(OS_CHROMEOS) +#include "chrome/browser/chromeos/touchpad.h" +#endif + namespace net { class StrictTransportSecurityState; class SSLConfigService; @@ -521,6 +525,10 @@ class ProfileImpl : public Profile, // GetSessionService won't recreate the SessionService. bool shutdown_session_service_; +#if defined(OS_CHROMEOS) + Touchpad touchpad_; +#endif + DISALLOW_COPY_AND_ASSIGN(ProfileImpl); }; |