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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_popup_base_view.cc

Issue 187583004: Fix gesture detection for autofill popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" 5 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h"
6 6
7 #include "chrome/browser/ui/autofill/popup_constants.h" 7 #include "chrome/browser/ui/autofill/popup_constants.h"
8 #include "ui/gfx/point.h" 8 #include "ui/gfx/point.h"
9 #include "ui/gfx/screen.h" 9 #include "ui/gfx/screen.h"
10 #include "ui/views/border.h" 10 #include "ui/views/border.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 case ui::ET_GESTURE_SCROLL_BEGIN: 179 case ui::ET_GESTURE_SCROLL_BEGIN:
180 case ui::ET_GESTURE_SCROLL_UPDATE: 180 case ui::ET_GESTURE_SCROLL_UPDATE:
181 if (HitTestPoint(event->location())) 181 if (HitTestPoint(event->location()))
182 SetSelection(event->location()); 182 SetSelection(event->location());
183 else 183 else
184 ClearSelection(); 184 ClearSelection();
185 break; 185 break;
186 case ui::ET_GESTURE_TAP: 186 case ui::ET_GESTURE_TAP:
187 case ui::ET_GESTURE_SCROLL_END: 187 case ui::ET_GESTURE_SCROLL_END:
188 if (HitTestPoint(event->location())) 188 if (HitTestPoint(event->location()))
189 SetSelection(event->location()); 189 AcceptSelection(event->location());
190 else 190 else
191 ClearSelection(); 191 ClearSelection();
192 break; 192 break;
193 case ui::ET_GESTURE_TAP_CANCEL: 193 case ui::ET_GESTURE_TAP_CANCEL:
194 case ui::ET_SCROLL_FLING_START: 194 case ui::ET_SCROLL_FLING_START:
195 ClearSelection(); 195 ClearSelection();
196 break; 196 break;
197 default: 197 default:
198 return; 198 return;
199 } 199 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool AutofillPopupBaseView::ShouldRepostEvent(const ui::MouseEvent& event) { 232 bool AutofillPopupBaseView::ShouldRepostEvent(const ui::MouseEvent& event) {
233 return delegate_->ShouldRepostEvent(event); 233 return delegate_->ShouldRepostEvent(event);
234 } 234 }
235 235
236 gfx::NativeView AutofillPopupBaseView::container_view() { 236 gfx::NativeView AutofillPopupBaseView::container_view() {
237 return delegate_->container_view(); 237 return delegate_->container_view();
238 } 238 }
239 239
240 240
241 } // namespace autofill 241 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698