commit | 2727e8a8d44244539b4d2002b451a59f8b4e40f3 | [log] [tgz] |
---|---|---|
author | Albert J. Wong <ajwong@chromium.org> | Fri Feb 15 16:56:11 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 15 16:56:11 2019 |
tree | 3d50346f13f39e5e539cd7df0c495b75f4396982 | |
parent | 1ad420dfa749b742a1fa72dbf8f02c102ecd94fd [diff] |
Remove the Web{View,Frame,Widget}Test{Proxy[Base],Client} forest. This CL builds on the huge amounts of ground work by danakj@ removing templates and clarifying usage + relations for these classes. This coding pattern of having proxy with a base class of common "fake" functionality along with an extra "client" that could have specific override of the base functionality was originally created to support the Mandolin project. Mandolin would have added a second client to blink in parallel to content. The structure of having a full proxy that could select between multiple fake client implementations made sense in this context. However, at this point, this forest of classes is overkill. For example, in the case of the View/Widget cluster of these classes, each cluster was using 3 classes in a multiple-inheritance and bridge configuration with lots of shell methods for the purpose of faking the implementation for 5-6 virtual methods. This CL merges all the Web{View,Frame,Widget}TestProxy classes with their .*Base superclass. This removes 3 multi-inheritance hierarchies which helps with code clarity and sanity in the debugger (it was easy to accidentally cast a pointer incorrectly in gdb and crash the debugger). WebViewClient and WebWidgetClient were also merged into the Proxy as the Proxies consisted mostly of forwarding logic. This again removes another set of objects that can get mis-assigned in code or mis-inspected in the debugger. Lastly, WebViewTestProxy no longer inherits from WebWidgetTestProxy mirroring the recent inheritance break between RenderView and RenderWidget. This removes some duplicated code (ScheduleAnimation() was nearly cut/paste between WebViewTestProxy and WebWidgetTestProxy) and allows for a cleaner InstallCreateXXXHooks pattern. See...deforestation isn't always bad. Bug: 545684, 912193 Change-Id: I42a4ffc2d3bb55f7d73e3b758daaddf058128a04 Reviewed-on: https://chromium-review.googlesource.com/c/1437324 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Albert J. Wong <ajwong@chromium.org> Auto-Submit: Albert J. Wong <ajwong@chromium.org> Cr-Commit-Position: refs/heads/master@{#632648}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .