DescriptionDecouple 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 #Messages
Total messages: 6 (6 generated)
|