Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 44543002: Enable touch for autofill popup view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_popup_view_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_popup_view_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698