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

Issue 501503003: Avoid an extra GestureDetector instance for double-tap drag zooming (Closed)

Created:
6 years, 4 months ago by jdduke (slow)
Modified:
6 years, 4 months ago
Reviewers:
tdresser
CC:
chromium-reviews, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Avoid an extra GestureDetector instance for double-tap drag zooming Currently, the ScaleGestureDetector will create a standalone GestureDetector instance for detecting double-tap events. This is overkill, however, as the only real callback it requires is the one for the initial |OnDoubleTap|, and running detection for all other gestures is wasteful. Avoid this by consolidating the GestureListener and ScaleGestureListener constructs, instead exposing an explicit |ScaleGestureDetector::OnDoubleTap()| method that is called indirectly using the existing GestureDetector instance. BUG=406175 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291555

Patch Set 1 #

Patch Set 2 : Remove unnecessary scoped_ptr include #

Total comments: 9

Patch Set 3 : Code review #

Total comments: 2

Patch Set 4 : Fix spelling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -461 lines) Patch
M ui/events/gesture_detection/gesture_config_helper_android.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/events/gesture_detection/gesture_config_helper_aura.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/gesture_detection/gesture_provider.h View 1 chunk +0 lines, -28 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider.cc View 1 2 21 chunks +308 lines, -383 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider_unittest.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/events/gesture_detection/scale_gesture_detector.h View 1 2 3 7 chunks +12 lines, -19 lines 0 comments Download
M ui/events/gesture_detection/scale_gesture_detector.cc View 5 chunks +3 lines, -24 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
jdduke (slow)
tdresser@: This looks big, but it's really just moving around some bits. Now we avoid ...
6 years, 4 months ago (2014-08-22 17:48:07 UTC) #1
tdresser
LGTM, with a few comments on the comments. https://codereview.chromium.org/501503003/diff/20001/ui/events/gesture_detection/gesture_provider.cc File ui/events/gesture_detection/gesture_provider.cc (right): https://codereview.chromium.org/501503003/diff/20001/ui/events/gesture_detection/gesture_provider.cc#newcode389 ui/events/gesture_detection/gesture_provider.cc:389: if ...
6 years, 4 months ago (2014-08-22 18:19:05 UTC) #2
jdduke (slow)
Thanks for review! https://codereview.chromium.org/501503003/diff/20001/ui/events/gesture_detection/gesture_provider.cc File ui/events/gesture_detection/gesture_provider.cc (right): https://codereview.chromium.org/501503003/diff/20001/ui/events/gesture_detection/gesture_provider.cc#newcode389 ui/events/gesture_detection/gesture_provider.cc:389: if (snap_scroll_controller_.IsSnapHorizontal()) { On 2014/08/22 18:19:04, ...
6 years, 4 months ago (2014-08-22 20:33:10 UTC) #3
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 4 months ago (2014-08-22 20:33:15 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/501503003/60001
6 years, 4 months ago (2014-08-22 20:34:37 UTC) #5
tdresser
Spelling nit. Feel free to land however you see fit. https://codereview.chromium.org/501503003/diff/60001/ui/events/gesture_detection/scale_gesture_detector.h File ui/events/gesture_detection/scale_gesture_detector.h (right): https://codereview.chromium.org/501503003/diff/60001/ui/events/gesture_detection/scale_gesture_detector.h#newcode27 ...
6 years, 4 months ago (2014-08-22 20:45:40 UTC) #6
jdduke (slow)
The CQ bit was unchecked by jdduke@chromium.org
6 years, 4 months ago (2014-08-22 21:26:11 UTC) #7
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 4 months ago (2014-08-22 21:26:50 UTC) #8
jdduke (slow)
https://codereview.chromium.org/501503003/diff/60001/ui/events/gesture_detection/scale_gesture_detector.h File ui/events/gesture_detection/scale_gesture_detector.h (right): https://codereview.chromium.org/501503003/diff/60001/ui/events/gesture_detection/scale_gesture_detector.h#newcode27 ui/events/gesture_detection/scale_gesture_detector.h:27: // a radius of average pointer deviation from the ...
6 years, 4 months ago (2014-08-22 21:26:55 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/501503003/80001
6 years, 4 months ago (2014-08-22 21:32:28 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-22 22:30:46 UTC) #11
commit-bot: I haz the power
6 years, 4 months ago (2014-08-22 23:33:38 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (80001) as 291555

Powered by Google App Engine
This is Rietveld 408576698