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

Issue 2091213002: Decouple EventWithLatencyInfo and WebInputEventTraits [extern templates] (Closed)

Created:
4 years, 6 months ago by tapted
Modified:
4 years, 1 month ago
Reviewers:
CC:
chromium-reviews, darin-cc_chromium.org, jam, dtapuska+chromiumwatch_chromium.org, 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 and 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 also become a bit simpler). To allow the guts to be hidden, use extern templates. This also takes some burden off the compiler/linker since less code needs to be generated on the fly and collapsed at link time. BUG=623844, 615948

Patch Set 1 #

Patch Set 2 : Update unit test #

Patch Set 3 : missing WARN_UNUSED #

Patch Set 4 : Platform-specific fixes #

Patch Set 5 : Fix windows? #

Patch Set 6 : Cleaner #

Patch Set 7 : Use export_template.h #

Patch Set 8 : Add missing content_unittests dep on //content/common (gn only) #

Patch Set 9 : Try no export? #

Patch Set 10 : So.. maybe this works #

Patch Set 11 : Fix for compiler bug #

Patch Set 12 : Looks like everyone has a compiler bug #

Patch Set 13 : Reference a better bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -355 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 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/common/input/event_with_latency_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +31 lines, -27 lines 0 comments Download
A content/common/input/event_with_latency_info.cc View 1 2 3 4 5 6 9 1 chunk +238 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 1 2 3 5 chunks +0 lines, -233 lines 0 comments Download
M content/common/input/web_input_event_traits_unittest.cc View 1 4 chunks +109 lines, -91 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 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

Messages

Total messages: 6 (6 generated)
tapted
Description was changed from ========== Decouple EventWithLatencyInfo and WebInputEventTraits Only EventWithLatencyInfo uses [Can]Coalesce() from WebInputEventTraits. ...
4 years, 6 months ago (2016-06-24 03:01:40 UTC) #1
tapted
tapted@chromium.org changed reviewers: + tdresser@chromium.org
4 years, 6 months ago (2016-06-24 03:01:40 UTC) #2
tapted
Patchset #11 (id:200001) has been deleted
4 years, 5 months ago (2016-06-28 00:35:19 UTC) #3
tapted
Description was changed from ========== Decouple EventWithLatencyInfo and WebInputEventTraits Only EventWithLatencyInfo uses [Can]Coalesce() from WebInputEventTraits. ...
4 years, 5 months ago (2016-06-28 03:30:23 UTC) #4
tapted
tapted@chromium.org changed reviewers: - tdresser@chromium.org
4 years, 5 months ago (2016-06-30 05:19:35 UTC) #5
tapted
4 years, 1 month ago (2016-11-03 02:00:44 UTC) #6
Message was sent while issue was closed.
Description was changed from

==========
Decouple EventWithLatencyInfo and 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 also become a bit simpler).

To allow the guts to be hidden, use extern templates. This also takes
some burden off the compiler/linker since less code needs to be
generated on the fly and collapsed at link time.

BUG=615948
==========

to

==========
Decouple EventWithLatencyInfo and 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 also become a bit simpler).

To allow the guts to be hidden, use extern templates. This also takes
some burden off the compiler/linker since less code needs to be
generated on the fly and collapsed at link time.

BUG=623844,615948
==========

Powered by Google App Engine
This is Rietveld 408576698