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

Unified Diff: ui/base/event.h

Issue 10832230: gestures: Cleanup touch-event handling code in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/event.h
diff --git a/ui/base/event.h b/ui/base/event.h
index 86d548864180bcb168f48cef0b064d3a27f216c3..4cd59cb678dbe55b0bc0eb13b975b25dbf9cb649 100644
--- a/ui/base/event.h
+++ b/ui/base/event.h
@@ -242,6 +242,18 @@ class UI_EXPORT TouchEventImpl : public LocatedEvent,
virtual float RotationAngle() const OVERRIDE;
virtual float Force() const OVERRIDE;
+ protected:
+ void set_radius(float radius_x, float radius_y) {
+ radius_x_ = radius_x;
+ radius_y_ = radius_y;
+ }
+
+ void set_rotation_angle(float rotation_angle) {
+ rotation_angle_ = rotation_angle;
+ }
+
+ void set_force(float force) { force_ = force; }
+
private:
// The identity (typically finger) of the touch starting at 0 and incrementing
// for each separable additional touch that the hardware can detect.
@@ -254,10 +266,10 @@ class UI_EXPORT TouchEventImpl : public LocatedEvent,
float radius_y_;
// Angle of the major axis away from the X axis. Default 0.0.
- const float rotation_angle_;
+ float rotation_angle_;
// Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0.
- const float force_;
+ float force_;
DISALLOW_COPY_AND_ASSIGN(TouchEventImpl);
};
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698