Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5665)

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 10264019: Support for cros touchpad 3-finger click as middle button. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/system/input_device_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences.cc
===================================================================
--- chrome/browser/chromeos/preferences.cc (revision 134766)
+++ chrome/browser/chromeos/preferences.cc (working copy)
@@ -73,6 +73,9 @@
prefs->RegisterBooleanPref(prefs::kTapToClickEnabled,
enable_tap_to_click_default,
PrefService::SYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kEnableTouchpadThreeFingerClick,
+ false,
+ PrefService::UNSYNCABLE_PREF);
prefs->RegisterBooleanPref(prefs::kNaturalScroll,
false,
PrefService::SYNCABLE_PREF);
@@ -259,6 +262,8 @@
void Preferences::InitUserPrefs(PrefService* prefs) {
tap_to_click_enabled_.Init(prefs::kTapToClickEnabled, prefs, this);
+ three_finger_click_enabled_.Init(prefs::kEnableTouchpadThreeFingerClick,
+ prefs, this);
natural_scroll_.Init(prefs::kNaturalScroll, prefs, this);
accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, prefs, this);
mouse_sensitivity_.Init(prefs::kMouseSensitivity, prefs, this);
@@ -372,6 +377,14 @@
else
UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled);
}
+ if (!pref_name || *pref_name == prefs::kEnableTouchpadThreeFingerClick) {
+ const bool enabled = three_finger_click_enabled_.GetValue();
+ system::touchpad_settings::SetThreeFingerClick(enabled);
+ if (pref_name)
+ UMA_HISTOGRAM_BOOLEAN("Touchpad.ThreeFingerClick.Changed", enabled);
+ else
+ UMA_HISTOGRAM_BOOLEAN("Touchpad.ThreeFingerClick.Started", enabled);
+ }
if (!pref_name || *pref_name == prefs::kNaturalScroll) {
const bool enabled = natural_scroll_.GetValue();
ui::SetNaturalScroll(enabled);
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/chromeos/system/input_device_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698