Invert class relation for suggestion ViewBinders and Views.
This change replaces inheritance with generics and, in turn, flips relation between Base- and Specialized ViewBinder classes. While more verbose, this gives us a better control and protection over how views and view binders are created and used. With this change we get: - better control over what individual viewbinders see, - better compile-time diagnostics for accidental typos and copy-paste errors, - better support for selective view substitution (enabling us to further optimize suggestions mechanism while staying safe). For the most part this ensures Compiler will catch and report an error early. In the extreme case where an error is repeated everywhere the error will be caught and thrown at runtime upon view creation. This change aligns with the original design proposal for suggestions refactor. More details: https://crrev.com/c/2007943 Doc: http://doc/1aL_UcW1gdeSLqNzuJZlQPBqMG0XAwVaoa05UTyVulp8 Bug: 982818 Change-Id: Ic8425512f3904cc29ea410723a9b7a717492e191 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017980 Commit-Queue: Ender <ender@google.com> Reviewed-by:Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#735094}
Showing
Please register or sign in to comment