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

Unified Diff: ui/aura/event.h

Issue 10175002: Fix scaling for aura::GestureEvent and aura::TouchEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GestureEvent handling 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 | « no previous file | ui/aura/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event.h
diff --git a/ui/aura/event.h b/ui/aura/event.h
index eb6f6f261989713a491615a510bf6e940f6bac49..da2788524d0154170086c79819dd470c7e8d14d0 100644
--- a/ui/aura/event.h
+++ b/ui/aura/event.h
@@ -112,8 +112,9 @@ class AURA_EXPORT LocatedEvent : public Event {
gfx::Point location() const { return location_; }
gfx::Point root_location() const { return root_location_; }
- // Applies the |root_transform| to both |location_| and |root_location_|.
- void UpdateForRootTransform(const ui::Transform& root_transform);
+ // Applies |root_transform| to the event.
+ // This is applied to both |location_| and |root_location_|.
+ virtual void UpdateForRootTransform(const ui::Transform& root_transform);
protected:
explicit LocatedEvent(const base::NativeEvent& native_event);
@@ -204,6 +205,10 @@ class AURA_EXPORT TouchEvent : public LocatedEvent,
float rotation_angle() const { return rotation_angle_; }
float force() const { return force_; }
+ // Overridden from LocatedEvent.
+ virtual void UpdateForRootTransform(
+ const ui::Transform& root_transform) OVERRIDE;
+
// Overridden from ui::TouchEvent.
virtual ui::EventType GetEventType() const OVERRIDE;
virtual gfx::Point GetLocation() const OVERRIDE;
@@ -218,10 +223,10 @@ class AURA_EXPORT TouchEvent : public LocatedEvent,
const int touch_id_;
// Radius of the X (major) axis of the touch ellipse. 1.0 if unknown.
- const float radius_x_;
+ float radius_x_;
// Radius of the Y (minor) axis of the touch ellipse. 1.0 if unknown.
- const float radius_y_;
+ float radius_y_;
// Angle of the major axis away from the X axis. Default 0.0.
const float rotation_angle_;
« no previous file with comments | « no previous file | ui/aura/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698