diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 00:48:01 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 00:48:01 +0000 |
commit | 912b6f3be7f1e31b4107ecb8b572245d9f65ff47 (patch) | |
tree | d43a9f10d01316cc817cd7619f1561e0ed279e04 /ui/aura/event.h | |
parent | 7d692835b4257b2621f969037f52e1dca67d833e (diff) | |
download | chromium_src-912b6f3be7f1e31b4107ecb8b572245d9f65ff47.zip chromium_src-912b6f3be7f1e31b4107ecb8b572245d9f65ff47.tar.gz chromium_src-912b6f3be7f1e31b4107ecb8b572245d9f65ff47.tar.bz2 |
aura: Move GestureRecognizer from views into aura.
Remove deprecated GestureManager, and move the functional GestureRecognizer from views into aura.
BUG=110227
TEST=views_unittests:GestureEvent, aura_unittests:GestureRecognizerTest
Review URL: https://chromiumcodereview.appspot.com/9255019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/event.h')
-rw-r--r-- | ui/aura/event.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ui/aura/event.h b/ui/aura/event.h index c840f43..9f97661 100644 --- a/ui/aura/event.h +++ b/ui/aura/event.h @@ -66,6 +66,7 @@ class AURA_EXPORT Event { void set_delete_native_event(bool delete_native_event) { delete_native_event_ = delete_native_event; } + void set_time_stamp(base::TimeDelta time_stamp) { time_stamp_ = time_stamp; } private: void operator=(const Event&); @@ -137,7 +138,7 @@ class AURA_EXPORT MouseEvent : public LocatedEvent { ui::EventType type, int flags); - // Used for synthetic events in testing. + // Used for synthetic events in testing and by the gesture recognizer. MouseEvent(ui::EventType type, const gfx::Point& location, int flags); // Compares two mouse down events and returns true if the second one should @@ -288,6 +289,28 @@ class AURA_EXPORT ScrollEvent : public MouseEvent { }; class AURA_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 TouchEvent which is identical to the provided model. + // If source / target windows are provided, the model location will be + // converted from |source| coordinate system to |target| coordinate system. + GestureEvent(const GestureEvent& model, Window* source, Window* 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 aura |