Chromium Code Reviews| Index: views/events/event.h |
| diff --git a/views/events/event.h b/views/events/event.h |
| index a7b3620b08c92ae3fe470e467892fc988b23db67..4f338a60d965af4c11ccaa29c678d7713f6594f8 100644 |
| --- a/views/events/event.h |
| +++ b/views/events/event.h |
| @@ -63,6 +63,11 @@ class VIEWS_EXPORT Event { |
| #endif |
| ui::EventType type() const { return type_; } |
| const base::Time& time_stamp() const { return time_stamp_; } |
| + |
| + // Required for Gesture testing purpose. |
| + void set_time_stamp(base::Time time_stamp) { time_stamp_ = time_stamp; } |
| + void set_native_event(const NativeEvent& event) { native_event_ = event; } |
|
rjkroege
2011/11/09 02:43:30
Per other discussion, am not convinced this is nec
Gajen
2011/11/10 15:52:55
Deprecated in this patch, now issue is moved to ht
|
| + |
| int flags() const { return flags_; } |
| void set_flags(int flags) { flags_ = flags; } |
| @@ -434,6 +439,34 @@ 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: |
| + friend class internal::RootView; |
| + |
| + GestureEvent(const GestureEvent& model, View* root); |
| + |
| + float delta_x_; |
| + float delta_y_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(GestureEvent); |
| +}; |
| + |
| } // namespace views |
| #endif // VIEWS_EVENTS_EVENT_H_ |