Chromium Code Reviews| Index: components/exo/pointer.cc |
| diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc |
| index 345a11806893593613556c1d73eae6956e30cfc1..a4df040b0fa4b1d0005e46ddf58fb87b9425dcd3 100644 |
| --- a/components/exo/pointer.cc |
| +++ b/components/exo/pointer.cc |
| @@ -117,29 +117,46 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
| case ui::ET_SCROLL: |
| if (focus_) { |
| ui::ScrollEvent* scroll_event = static_cast<ui::ScrollEvent*>(event); |
| - delegate_->OnPointerWheel( |
| + delegate_->OnPointerScroll( |
| event->time_stamp(), |
| - gfx::Vector2d(scroll_event->x_offset(), scroll_event->y_offset())); |
| + gfx::Vector2dF(scroll_event->x_offset(), scroll_event->y_offset()), |
| + false); |
| } |
| break; |
| case ui::ET_MOUSEWHEEL: |
| if (focus_) { |
| - delegate_->OnPointerWheel( |
| + delegate_->OnPointerScroll( |
| event->time_stamp(), |
| - static_cast<ui::MouseWheelEvent*>(event)->offset()); |
| + static_cast<ui::MouseWheelEvent*>(event)->offset(), true); |
| + } |
| + break; |
| + case ui::ET_SCROLL_FLING_START: |
| + if (focus_) { |
|
reveman
2016/03/02 04:16:53
nit: not need for "{" "}"
denniskempin
2016/03/02 20:47:58
Done.
|
| + delegate_->OnPointerScrollStop(event->time_stamp()); |
| + } |
| + break; |
| + case ui::ET_SCROLL_FLING_CANCEL: |
| + if (focus_) { |
| + // Wayland doesn't know the concept of a fling cancel. But we can send a |
|
reveman
2016/03/02 04:16:52
nit: please add a OnPointerScrollStart (feel free
denniskempin
2016/03/02 20:47:58
Done.
|
| + // zero distance scroll to stop any kinetic scrolling that might be |
| + // going on. |
| + delegate_->OnPointerScroll(event->time_stamp(), gfx::Vector2dF(0, 0), |
| + false); |
| } |
| break; |
| case ui::ET_MOUSE_ENTERED: |
| case ui::ET_MOUSE_EXITED: |
| case ui::ET_MOUSE_CAPTURE_CHANGED: |
| - case ui::ET_SCROLL_FLING_START: |
| - case ui::ET_SCROLL_FLING_CANCEL: |
| break; |
| default: |
| NOTREACHED(); |
| break; |
| } |
| + if (focus_) { |
|
reveman
2016/03/02 04:16:52
nit: not need for "{" "}"
denniskempin
2016/03/02 20:47:58
Done.
|
| + delegate_->OnPointerFrame(); |
| + } |
| + |
| // Update cursor widget to reflect current focus and pointer location. |
| if (focus_) { |
| if (!widget_) |