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

Unified Diff: views/events/event.h

Issue 8364039: Initial views touchui GestureRecognizer support (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Event injection as per Robert comments Created 9 years, 2 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
Index: views/events/event.h
diff --git a/views/events/event.h b/views/events/event.h
index 5312ecd5fad694c824ad5f471fadf6ed5680f24a..a4c767042a9ada2b4db2d51d89bfdb4555db1901 100644
--- a/views/events/event.h
+++ b/views/events/event.h
@@ -109,6 +109,7 @@ class VIEWS_EXPORT Event {
}
void set_type(ui::EventType type) { type_ = type; }
+ void set_time_stamp(base::Time time_stamp) { time_stamp_ = time_stamp; }
private:
void operator=(const Event&);
@@ -434,6 +435,30 @@ class VIEWS_EXPORT DropTargetEvent : public LocatedEvent {
DISALLOW_COPY_AND_ASSIGN(DropTargetEvent);
};
+////////////////////////////////////////////////////////////////////////////////
+// GestureEvent class
+//
+////////////////////////////////////////////////////////////////////////////////
+class VIEWS_EXPORT GestureEvent : public LocatedEvent {
+ public:
+ GestureEvent(ui::EventType type, int x, int y, int flags,
+ base::Time time_stamp, float delta_x, float delta_y);
+
+ // Create a new GestureEvent which is identical to the provided model.
+ // If source / target views are provided, the model location will be converted
+ // from |source| coordinate system to |target| coordinate system.
+ GestureEvent(const GestureEvent& model, View* source, View* target);
+
+ float delta_x() const { return delta_x_; }
+ float delta_y() const { return delta_y_; }
+
+ private:
+ float delta_x_;
+ float delta_y_;
+
+ DISALLOW_COPY_AND_ASSIGN(GestureEvent);
+};
+
} // namespace views
#endif // VIEWS_EVENTS_EVENT_H_
« no previous file with comments | « ui/base/events.h ('k') | views/events/event.cc » ('j') | views/events/event.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698