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

Issue 2111593003: Decouple EventWithLatencyInfo from WebInputEventTraits (Closed)

Created:
4 years, 5 months ago by tapted
Modified:
4 years, 5 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, dtapuska+chromiumwatch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple EventWithLatencyInfo from WebInputEventTraits Only EventWithLatencyInfo uses [Can]Coalesce() from WebInputEventTraits. WebInputEventTraits gets used for IPC stuff so is kinda sensitive, but EventWithLatencyInfo isn't involved with IPC. So, coupling these together also makes refactoring unnecessarily difficult. E.g. the coupling means that if we want to move EventWithLatencyInfo to a component, then WebInputEventTraits and a bunch of dependencies that EventWithLatencyInfo doesn't care about need to come as well. To decouple, the guts of [Can]Coalesce() moves to a new .cc file for EventWithLatencyInfo. The types are known, so we get some added type safety versus WebInputEventTraits which isn't templatized in the .h. The instantiations in the .cc become a bit simpler and the runtime type checks and static casts behind in web_input_event_trait.cc's Apply(..) are not required. BUG=615948 TBR=jochen@chromium.org (iwyu) Committed: https://crrev.com/85282366fed27efe2e19a686b1376ad9eca37d84 Cr-Commit-Position: refs/heads/master@{#403402}

Patch Set 1 : Baseline version from crrev/2091213002 using extern templates #

Patch Set 2 : rebase #

Patch Set 3 : Ditch the template externs #

Patch Set 4 : lint diff #

Patch Set 5 : lint, iwyu #

Patch Set 6 : lint, iwyu #

Total comments: 5

Patch Set 7 : why did I need that web_contents_impl change again? #

Patch Set 8 : Bug reference + web_contents_impl iwyu to .cc #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+358 lines, -338 lines) Patch
M content/browser/renderer_host/input/gesture_event_queue.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/input/mouse_wheel_event_queue.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/input/render_widget_host_latency_tracker.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_base.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 1 comment Download
M content/common/input/event_with_latency_info.h View 1 2 3 4 5 2 chunks +38 lines, -10 lines 0 comments Download
A content/common/input/event_with_latency_info.cc View 1 2 3 4 5 1 chunk +198 lines, -0 lines 0 comments Download
M content/common/input/web_input_event_traits.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/common/input/web_input_event_traits.cc View 5 chunks +0 lines, -233 lines 0 comments Download
M content/common/input/web_input_event_traits_unittest.cc View 1 2 3 4 5 6 4 chunks +110 lines, -91 lines 0 comments Download
M content/content_common.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (14 generated)
tapted
Hi Tim, please take a look https://codereview.chromium.org/2111593003/diff/120001/content/common/input/event_with_latency_info.h File content/common/input/event_with_latency_info.h (right): https://codereview.chromium.org/2111593003/diff/120001/content/common/input/event_with_latency_info.h#newcode35 content/common/input/event_with_latency_info.h:35: } // namespace ...
4 years, 5 months ago (2016-06-30 12:13:45 UTC) #6
tdresser
LGTM with minor nits. https://codereview.chromium.org/2111593003/diff/120001/content/common/input/event_with_latency_info.h File content/common/input/event_with_latency_info.h (right): https://codereview.chromium.org/2111593003/diff/120001/content/common/input/event_with_latency_info.h#newcode8 content/common/input/event_with_latency_info.h:8: #include "base/compiler_specific.h" Are we using ...
4 years, 5 months ago (2016-06-30 14:16:39 UTC) #7
tapted
Thanks! +jochen TBR for web_contents_impl.cc (just adding a required header previously included transitively) https://codereview.chromium.org/2111593003/diff/120001/content/common/input/event_with_latency_info.h File ...
4 years, 5 months ago (2016-07-01 02:53:45 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2111593003/220001
4 years, 5 months ago (2016-07-01 02:54:03 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:220001)
4 years, 5 months ago (2016-07-01 03:42:22 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 03:45:21 UTC) #20
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/85282366fed27efe2e19a686b1376ad9eca37d84
Cr-Commit-Position: refs/heads/master@{#403402}

Powered by Google App Engine
This is Rietveld 408576698