Makes FontList light-weighted introducing FontListImpl.
Like Font class has scoped_refptr<PlatformFont>, makes FontList have scoped_refptr<FontListImpl>. FontListImpl is almost the same as the old FontList and implements all functionalities.
There are two major benefits with this CL.
1. Copying a FontList to another FontList is very quick. It just copies a scoped_refptr.
2. Calculated font metrics are shared among all FontList instances which refer to the same FontListImpl.
In addition, this CL may fix Issue 340396. I don't fully understand the cause yet, but it seems that copying the object in a ctor is causing the issue (It's a little tricky, but I thought it should be okay). This CL doesn't copy the object. So I think this CL may fix the issue.
BUG=340396
TEST=Run ui_unittests, views_unittests and unit_tests.
Review URL: https://codereview.chromium.org/148773007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249976 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed