| Index: ui/views/events/event.h
|
| diff --git a/ui/views/events/event.h b/ui/views/events/event.h
|
| index 640e9918cf2fe27e7a47fe3f111fffb64b8ca347..28301142d383ad2842f72e1a617401177dd04f67 100644
|
| --- a/ui/views/events/event.h
|
| +++ b/ui/views/events/event.h
|
| @@ -62,6 +62,10 @@ class VIEWS_EXPORT Event {
|
| #endif
|
| ui::EventType type() const { return type_; }
|
| const base::Time& time_stamp() const { return time_stamp_; }
|
| +
|
| + // Required for Gesture testing purposes.
|
| + void set_time_stamp(base::Time time_stamp) { time_stamp_ = time_stamp; }
|
| +
|
| int flags() const { return flags_; }
|
| void set_flags(int flags) { flags_ = flags; }
|
|
|
| @@ -419,6 +423,39 @@ class VIEWS_EXPORT ScrollEvent : public MouseEvent {
|
| DISALLOW_COPY_AND_ASSIGN(ScrollEvent);
|
| };
|
|
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// 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:
|
| + friend class internal::RootView;
|
| +
|
| + GestureEvent(const GestureEvent& model, View* root);
|
| +
|
| + float delta_x_;
|
| + float delta_y_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GestureEvent);
|
| +};
|
| +
|
| } // namespace views
|
|
|
| #endif // UI_VIEWS_EVENTS_EVENT_H_
|
|
|