diff options
author | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 17:42:13 +0000 |
---|---|---|
committer | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 17:42:13 +0000 |
commit | 5e235f9394c890c0af2afb0932346e2543c3c66f (patch) | |
tree | 9895849f579f46bbe56e19fdddeb15d846b59931 /chrome/browser/ui/webui/gesture_config_ui.cc | |
parent | 335f63c08495f7dd9be4ad9a24743a652dd1c7d5 (diff) | |
download | chromium_src-5e235f9394c890c0af2afb0932346e2543c3c66f.zip chromium_src-5e235f9394c890c0af2afb0932346e2543c3c66f.tar.gz chromium_src-5e235f9394c890c0af2afb0932346e2543c3c66f.tar.bz2 |
Added TapSuppressionController params to gesture configurations
Added TapSuppressionController parameters to GestureConfiguration and
used them in TSC.
Removed command line options for configuring TSC, because now they can
be configured through UI.
Added the ability to configure integer parameters through UI, since TSC
parameters are integers.
BUG=162031
Review URL: https://chromiumcodereview.appspot.com/11745006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/gesture_config_ui.cc')
-rw-r--r-- | chrome/browser/ui/webui/gesture_config_ui.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/ui/webui/gesture_config_ui.cc b/chrome/browser/ui/webui/gesture_config_ui.cc index 8f90f0d..6797789 100644 --- a/chrome/browser/ui/webui/gesture_config_ui.cc +++ b/chrome/browser/ui/webui/gesture_config_ui.cc @@ -108,6 +108,17 @@ void GestureConfigUI::SetPreferenceValue(const base::ListValue* args) { Profile* profile = Profile::FromWebUI(web_ui()); PrefService* prefs = profile->GetPrefs(); - prefs->SetDouble(pref_name.c_str(), value); + const PrefService::Preference* pref = + prefs->FindPreference(pref_name.c_str()); + switch (pref->GetType()) { + case base::Value::TYPE_INTEGER: + prefs->SetInteger(pref_name.c_str(), static_cast<int>(value)); + break; + case base::Value::TYPE_DOUBLE: + prefs->SetDouble(pref_name.c_str(), value); + break; + default: + NOTREACHED(); + } } |