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

Unified Diff: chrome/browser/chromeos/system/input_device_settings.cc

Issue 212603005: Don't handle NaturalScroll in Chrome but pass it to CMT instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ash unit tests Created 6 years, 9 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/system/input_device_settings.h ('k') | chrome/browser/ui/views/ash/tab_scrubber.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/input_device_settings.cc
diff --git a/chrome/browser/chromeos/system/input_device_settings.cc b/chrome/browser/chromeos/system/input_device_settings.cc
index 10cc5a652d387e065261a971da19cd271d510ccf..e92b31adb18df975a0bddb98301537e173da4e85 100644
--- a/chrome/browser/chromeos/system/input_device_settings.cc
+++ b/chrome/browser/chromeos/system/input_device_settings.cc
@@ -151,6 +151,7 @@ class InputDeviceSettingsImpl : public InputDeviceSettings {
virtual void SetTapToClick(bool enabled) OVERRIDE;
virtual void SetThreeFingerClick(bool enabled) OVERRIDE;
virtual void SetTapDragging(bool enabled) OVERRIDE;
+ virtual void SetNaturalScroll(bool enabled) OVERRIDE;
virtual void MouseExists(const DeviceExistsCallback& callback) OVERRIDE;
virtual void UpdateMouseSettings(const MouseSettings& update) OVERRIDE;
virtual void SetMouseSensitivity(int value) OVERRIDE;
@@ -186,6 +187,12 @@ void InputDeviceSettingsImpl::SetTouchpadSensitivity(int value) {
UpdateTouchpadSettings(settings);
}
+void InputDeviceSettingsImpl::SetNaturalScroll(bool enabled) {
+ TouchpadSettings settings;
+ settings.SetNaturalScroll(enabled);
+ UpdateTouchpadSettings(settings);
+}
+
void InputDeviceSettingsImpl::SetTapToClick(bool enabled) {
TouchpadSettings settings;
settings.SetTapToClick(enabled);
@@ -276,6 +283,7 @@ TouchpadSettings& TouchpadSettings::operator=(const TouchpadSettings& other) {
tap_to_click_ = other.tap_to_click_;
three_finger_click_ = other.three_finger_click_;
tap_dragging_ = other.tap_dragging_;
+ natural_scroll_ = other.natural_scroll_;
}
return *this;
}
@@ -296,6 +304,14 @@ bool TouchpadSettings::GetTapToClick() const {
return tap_to_click_.value();
}
+void TouchpadSettings::SetNaturalScroll(bool enabled) {
+ natural_scroll_.Set(enabled);
+}
+
+bool TouchpadSettings::GetNaturalScroll() const {
+ return natural_scroll_.value();
+}
+
void TouchpadSettings::SetThreeFingerClick(bool enabled) {
three_finger_click_.Set(enabled);
}
@@ -339,6 +355,12 @@ bool TouchpadSettings::Update(const TouchpadSettings& settings,
if (argv)
AddTPControlArguments("tapdrag", tap_dragging_.value(), argv);
}
+ if (natural_scroll_.Update(settings.natural_scroll_)) {
+ updated = true;
+ if (argv)
+ AddTPControlArguments("australian_scrolling", natural_scroll_.value(),
+ argv);
+ }
return updated;
}
« no previous file with comments | « chrome/browser/chromeos/system/input_device_settings.h ('k') | chrome/browser/ui/views/ash/tab_scrubber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698