Chromium Code Reviews

Issue 565583005: Clean up GestureEventDetails constructors (Closed)

Created:
6 years, 3 months ago by lanwei
Modified:
6 years, 3 months ago
Reviewers:
jdduke (slow), sadrul, tdresser, sky
CC:
chromium-reviews, tdanderson+views_chromium.org, sadrul, dyu1, tfarina, benquan, Ilya Sherman, jdduke+watch_chromium.org, tdresser+watch_chromium.org, jam, dcheng, ben+aura_chromium.org, darin-cc_chromium.org, Dane Wallinga, oshima+watch_chromium.org, estade+watch_chromium.org, rouslan+autofillwatch_chromium.org, kalyank, ben+views_chromium.org, ben+corewm_chromium.org, stevenjb+watch_chromium.org, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Clean up GestureEventDetails' constructors. In one of the GestureEventDetails' constructors, the arguments delta_x, delta_y sometime are not used, so we should make a new constructor which only takes one argument EventType. BUG=350942 Committed: https://crrev.com/b5e408e7bffd3d1e6b60612f65c0538a90329c59 Cr-Commit-Position: refs/heads/master@{#294760}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : Alwasy set oldest_touch_id_ to -1 in the constructor #

Total comments: 4

Patch Set 3 : Made changes based on comments #

Patch Set 4 : Upload to the most recent patch #

Unified diffs Side-by-side diffs Stats (+171 lines, -216 lines)
M ash/drag_drop/drag_drop_controller.cc View 1 chunk +5 lines, -6 lines 0 comments
M ash/drag_drop/drag_drop_controller_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M ash/shelf/shelf_tooltip_manager_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments
M ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments
M ash/system/overview/overview_button_tray_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments
M chrome/browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc View 1 chunk +1 line, -1 line 0 comments
M chrome/browser/ui/views/desktop_media_picker_views_unittest.cc View 1 chunk +3 lines, -7 lines 0 comments
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc View 1 chunk +6 lines, -7 lines 0 comments
M content/browser/renderer_host/input/gesture_text_selector_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M content/browser/web_contents/touch_editable_impl_aura_browsertest.cc View 5 chunks +7 lines, -10 lines 0 comments
M ui/aura/remote_window_tree_host_win.cc View 1 chunk +1 line, -1 line 0 comments
M ui/aura/window_event_dispatcher_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M ui/events/gesture_detection/gesture_event_data.cc View 1 chunk +1 line, -1 line 0 comments
M ui/events/gesture_detection/gesture_event_data_packet_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M ui/events/gesture_detection/gesture_provider.cc View 7 chunks +11 lines, -8 lines 0 comments
M ui/events/gesture_detection/touch_disposition_gesture_filter.cc View 1 chunk +1 line, -1 line 0 comments
M ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M ui/events/gesture_event_details.h View 2 chunks +7 lines, -0 lines 0 comments
M ui/events/gesture_event_details.cc View 3 chunks +8 lines, -18 lines 0 comments
M ui/events/test/event_generator.cc View 1 chunk +1 line, -5 lines 0 comments
M ui/views/controls/button/custom_button_unittest.cc View 1 chunk +1 line, -1 line 0 comments
M ui/views/controls/table/table_view_unittest.cc View 2 chunks +3 lines, -4 lines 0 comments
M ui/views/controls/textfield/textfield_unittest.cc View 7 chunks +24 lines, -22 lines 0 comments
M ui/views/corewm/desktop_capture_controller_unittest.cc View 1 chunk +5 lines, -6 lines 0 comments
M ui/views/touchui/touch_selection_controller_impl_unittest.cc View 5 chunks +15 lines, -25 lines 0 comments
M ui/views/view_targeter_unittest.cc View 4 chunks +8 lines, -8 lines 0 comments
M ui/views/widget/root_view_unittest.cc View 6 chunks +18 lines, -36 lines 0 comments
M ui/views/widget/widget_interactive_uitest.cc View 1 chunk +2 lines, -4 lines 0 comments
M ui/views/widget/widget_unittest.cc View 8 chunks +26 lines, -32 lines 0 comments
M ui/wm/core/user_activity_detector_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments

Messages

Total messages: 25 (8 generated)
lanwei
Hello Tim, can you please take a look at the gesture_event_details.h and gesture_event_details.cc files, which ...
6 years, 3 months ago (2014-09-11 23:00:06 UTC) #5
lanwei
jdduke@chromium.org: Please review changes in sadrul@chromium.org: Please review changes in can you please take a ...
6 years, 3 months ago (2014-09-11 23:01:37 UTC) #7
jdduke (slow)
Yay! ui/events/gesture_detection and content/browser/renderer_host/input/gesture_text_selector_unittest.cc lgtm. https://codereview.chromium.org/565583005/diff/40001/ui/events/gesture_event_details.cc File ui/events/gesture_event_details.cc (right): https://codereview.chromium.org/565583005/diff/40001/ui/events/gesture_event_details.cc#newcode22 ui/events/gesture_event_details.cc:22: : type_(type), touch_points_(1), oldest_touch_id_(0) ...
6 years, 3 months ago (2014-09-11 23:37:56 UTC) #8
tdresser
Nice! gesture_event_details.* LGTM! https://codereview.chromium.org/565583005/diff/40001/ui/events/gesture_event_details.cc File ui/events/gesture_event_details.cc (right): https://codereview.chromium.org/565583005/diff/40001/ui/events/gesture_event_details.cc#newcode16 ui/events/gesture_event_details.cc:16: DCHECK_LE(type, ET_GESTURE_TYPE_END); I think it would ...
6 years, 3 months ago (2014-09-12 12:35:27 UTC) #9
lanwei
sky@chromium.org: Please review changes in We are making changes to the GestureEventDetails's constructors, so we ...
6 years, 3 months ago (2014-09-12 14:58:52 UTC) #11
jdduke (slow)
https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.cc File ui/events/gesture_event_details.cc (right): https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.cc#newcode54 ui/events/gesture_event_details.cc:54: NOTREACHED(); It may be worth logging the type here, ...
6 years, 3 months ago (2014-09-12 15:02:04 UTC) #12
sadrul
LGTM https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.h File ui/events/gesture_event_details.h (right): https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.h#newcode19 ui/events/gesture_event_details.h:19: GestureEventDetails(EventType type); explicit
6 years, 3 months ago (2014-09-12 15:28:46 UTC) #13
sky
If we're changing things around, how about removing GestureDetails from GestureEvents constructor and adding: GestureEventDetails* ...
6 years, 3 months ago (2014-09-12 15:59:06 UTC) #14
tdresser
On 2014/09/12 15:59:06, sky wrote: > If we're changing things around, how about removing GestureDetails ...
6 years, 3 months ago (2014-09-12 16:51:17 UTC) #15
sky
On Fri, Sep 12, 2014 at 9:51 AM, <tdresser@chromium.org> wrote: > On 2014/09/12 15:59:06, sky ...
6 years, 3 months ago (2014-09-12 19:54:29 UTC) #16
sky
LGTM
6 years, 3 months ago (2014-09-12 19:54:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/565583005/100001
6 years, 3 months ago (2014-09-14 02:37:27 UTC) #19
lanwei
https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.cc File ui/events/gesture_event_details.cc (right): https://codereview.chromium.org/565583005/diff/60001/ui/events/gesture_event_details.cc#newcode54 ui/events/gesture_event_details.cc:54: NOTREACHED(); On 2014/09/12 15:02:04, jdduke wrote: > It may ...
6 years, 3 months ago (2014-09-14 02:46:27 UTC) #20
lanwei
6 years, 3 months ago (2014-09-14 02:46:29 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:100001) as 9b493949ce2a6e645c75cde0b572ed7181e8bf30
6 years, 3 months ago (2014-09-14 05:26:21 UTC) #22
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b5e408e7bffd3d1e6b60612f65c0538a90329c59 Cr-Commit-Position: refs/heads/master@{#294760}
6 years, 3 months ago (2014-09-14 05:29:30 UTC) #23
nhiroki
6 years, 3 months ago (2014-09-15 01:48:43 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:100001) has been created in
https://codereview.chromium.org/572593002/ by nhiroki@chromium.org.

The reason for reverting is: This seems to fail the following tests in
"athena_unittests" on "Linux ChromiumOS Tests (dbg)(3)"

- HomeCardGestureManagerTest.Basic
- HomeCardGestureManagerTest.StartCentered

http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%2....

Powered by Google App Engine