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

Unified Diff: ui/events/x/device_data_manager.h

Issue 221363002: Revert of Don't handle NaturalScroll in Chrome but pass it to CMT instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « ui/events/event_utils.h ('k') | ui/events/x/device_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/device_data_manager.h
diff --git a/ui/events/x/device_data_manager.h b/ui/events/x/device_data_manager.h
index ce009a0086f94bb7215e233022b73a350165c29d..aff064935718000d97f23a866178e0629fe4e810 100644
--- a/ui/events/x/device_data_manager.h
+++ b/ui/events/x/device_data_manager.h
@@ -104,8 +104,17 @@
// Returns the DeviceDataManager singleton.
static DeviceDataManager* GetInstance();
+ // Natural scroll setter/getter.
+ bool natural_scroll_enabled() const { return natural_scroll_enabled_; }
+ void set_natural_scroll_enabled(bool enabled) {
+ natural_scroll_enabled_ = enabled;
+ }
+
// Returns if XInput2 is available on the system.
bool IsXInput2Available() const;
+
+ // Get the natural scroll direction multiplier (1.0f or -1.0f).
+ float GetNaturalScrollFactor(int sourceid) const;
// Updates the list of devices.
void UpdateDeviceList(Display* display);
@@ -239,6 +248,7 @@
static const int kMaxDeviceNum = 128;
static const int kMaxXIEventType = XI_LASTEVENT + 1;
static const int kMaxSlotNum = 10;
+ bool natural_scroll_enabled_;
// Major opcode for the XInput extension. Used to identify XInput events.
int xi_opcode_;
« no previous file with comments | « ui/events/event_utils.h ('k') | ui/events/x/device_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698