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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev.h

Issue 2263693003: Add palm suppression feature to EventConverterEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylus
Patch Set: fixed unit tests Created 4 years, 4 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/ozone/evdev/touch_evdev_types.h ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/touch_event_converter_evdev.h
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
index ccb60d7c1331b13939b3300e0887498da2a365d8..1083649602e98e0e96c8a828bee520399277f73e 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
@@ -45,6 +45,7 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// EventConverterEvdev:
bool HasTouchscreen() const override;
+ bool HasPen() const override;
gfx::Size GetTouchscreenSize() const override;
int GetTouchPoints() const override;
void OnEnabled() override;
@@ -55,6 +56,10 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Update touch event logging state
void SetTouchEventLoggingEnabled(bool enabled) override;
+ // Sets callback to enable/disable palm suppression.
+ void SetPalmSuppressionCallback(
+ const base::Callback<void(bool)>& callback) override;
+
// Unsafe part of initialization.
virtual void Initialize(const EventDeviceInfo& info);
@@ -104,6 +109,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Device has multitouch capability.
bool has_mt_ = false;
+ // Device supports pen input.
+ bool has_pen_ = false;
+
// Use BTN_LEFT instead of BT_TOUCH.
bool quirk_left_mouse_button_ = false;
@@ -122,6 +130,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Number of touch points reported by driver
int touch_points_ = 0;
+ // Maximum value of touch major axis
+ int major_max_ = 0;
+
// Tracking id counter.
int next_tracking_id_ = 0;
@@ -140,6 +151,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Records the recent touch events. It is used to fill the feedback reports
TouchEventLogEvdev touch_evdev_debug_buffer_;
+ // Callback to enable/disable palm suppression.
+ base::Callback<void(bool)> enable_palm_suppression_callback_;
+
DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
};
« no previous file with comments | « ui/events/ozone/evdev/touch_evdev_types.h ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698