Chromium Code Reviews| Index: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| index 818112c82f15c7d980dd906fc93bde63ec8dd33d..ad25327418426d305584df2a166451943d797af6 100644 |
| --- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc |
| @@ -162,6 +162,34 @@ void AutofillPopupViewViews::OnMouseReleased(const ui::MouseEvent& event) { |
| controller_->MouseClicked(event.x(), event.y()); |
| } |
| +void AutofillPopupViewViews::OnGestureEvent(ui::GestureEvent* event) { |
| + if (!controller_) |
| + return; |
| + |
| + switch (event->type()) { |
| + case ui::ET_GESTURE_TAP_DOWN: |
| + case ui::ET_GESTURE_SCROLL_UPDATE: |
| + if (HitTestPoint(event->location())) |
| + controller_->MouseHovered(event->x(), event->y()); |
|
Rick Byers
2013/10/25 17:22:23
nit: would be nice to update these method names to
|
| + else |
| + controller_->MouseExitedPopup(); |
| + break; |
| + case ui::ET_GESTURE_TAP: |
| + case ui::ET_GESTURE_SCROLL_END: |
| + if (HitTestPoint(event->location())) |
| + controller_->MouseClicked(event->x(), event->y()); |
| + else |
| + controller_->MouseExitedPopup(); |
| + break; |
| + case ui::ET_GESTURE_TAP_CANCEL: |
| + case ui::ET_SCROLL_FLING_START: |
| + controller_->MouseExitedPopup(); |
| + default: |
| + break; |
| + } |
| + event->SetHandled(); |
|
Dan Beam
2013/10/25 18:38:23
don't you only want to set the event handled in so
mohsen
2013/10/25 21:36:41
I think it is not making any difference in this ca
|
| +} |
| + |
| void AutofillPopupViewViews::OnWidgetBoundsChanged( |
| views::Widget* widget, |
| const gfx::Rect& new_bounds) { |