diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 01:19:43 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 01:19:43 +0000 |
commit | 6b2e271f2babfee4e7c3e3814872cf2308efb4b9 (patch) | |
tree | 78c983da8afa6d8bfb059b05ebe67cea7dd7d5d8 /ui/aura | |
parent | 40bcbbd1d091c4c1ea7dc623bd287fee2797bab0 (diff) | |
download | chromium_src-6b2e271f2babfee4e7c3e3814872cf2308efb4b9.zip chromium_src-6b2e271f2babfee4e7c3e3814872cf2308efb4b9.tar.gz chromium_src-6b2e271f2babfee4e7c3e3814872cf2308efb4b9.tar.bz2 |
Send GestureFlingStart and GestureFlingCancel when cmt sends them
BUG=114818
TEST=None
Review URL: https://chromiumcodereview.appspot.com/9601022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r-- | ui/aura/event.cc | 10 | ||||
-rw-r--r-- | ui/aura/root_window_host_linux.cc | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ui/aura/event.cc b/ui/aura/event.cc index c2a0510..37076dc 100644 --- a/ui/aura/event.cc +++ b/ui/aura/event.cc @@ -368,7 +368,14 @@ KeyEvent* KeyEvent::Copy() { ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) : MouseEvent(native_event) { - ui::GetScrollOffsets(native_event, &x_offset_, &y_offset_); + if (type() == ui::ET_SCROLL) { + ui::GetScrollOffsets(native_event, &x_offset_, &y_offset_); + double start, end; + ui::GetGestureTimes(native_event, &start, &end); + } else if (type() == ui::ET_SCROLL_FLING_START) { + bool is_cancel; + ui::GetFlingData(native_event, &x_offset_, &y_offset_, &is_cancel); + } } GestureEvent::GestureEvent(ui::EventType type, @@ -381,7 +388,6 @@ GestureEvent::GestureEvent(ui::EventType type, : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags), delta_x_(delta_x), delta_y_(delta_y) { - // XXX: Why is aura::Event::time_stamp_ a TimeDelta instead of a Time? set_time_stamp(base::TimeDelta::FromSeconds(time_stamp.ToDoubleT())); } diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc index 3a91aea..8fa1cec 100644 --- a/ui/aura/root_window_host_linux.cc +++ b/ui/aura/root_window_host_linux.cc @@ -419,6 +419,8 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch( handled = root_window_->DispatchMouseEvent(&mouseev); break; } + case ui::ET_SCROLL_FLING_START: + case ui::ET_SCROLL_FLING_CANCEL: case ui::ET_SCROLL: { ScrollEvent scrollev(xev); handled = root_window_->DispatchScrollEvent(&scrollev); |