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..c4f6753da355e2602b21188fd5d2afe556a7d4cc 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,36 @@ 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_BEGIN: |
+ case ui::ET_GESTURE_SCROLL_UPDATE: |
+ if (HitTestPoint(event->location())) |
+ controller_->MouseHovered(event->x(), event->y()); |
+ 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(); |
+ break; |
+ default: |
+ return; |
+ } |
+ event->SetHandled(); |
Dan Beam
2013/10/26 01:56:09
^ this doesn't seem done
mohsen
2013/10/26 03:30:00
non-handled events return from the function before
Dan Beam
2013/10/28 19:31:18
ah, i see
|
+} |
+ |
void AutofillPopupViewViews::OnWidgetBoundsChanged( |
views::Widget* widget, |
const gfx::Rect& new_bounds) { |