weblayer: initial cut at favicon support (C++ side only)
There are still some TODOS (most notably incognito is not supported), but this can largely be used outside of that. Embedder usage is as follows: . embedders interested in favicons call Tab::CreateFaviconFetcher() supplying a delegate. At this time embedders don't get the ability to specify a size (I wouldn't be surprised if we need this later). The actual size requested depends upon the platform. . The delegate is notified any time the favicon of the current navigation changes (not including when a new navigation starts). . The current favicon can be requested from the FaviconFetcher returned from CreateFaviconFetcher. Implementation wise the following pieces are used: . FaviconServiceImpl: implementation of favicon::CoreFaviconService that is used on the main thread to interact with WebLayerFaviconBackend. . WebLayerFaviconBackend: owns the database. All methods largely delegate to the database (same database used in chrome). . FaviconTabHelper: responsible for creating favicon::ContentFaviconDriver as necessary. ContentFaviconDriver is ultimately responsible for getting the favicon for the current navigation. ContentFaviconDriver is only created when necessary (meaning CreateFaviconFetcher() was called) as it actively downloads favicons. . FaviconFetcherImpl: created via Tab::CreateFaviconFetcher(), uses FaviconTabHelper to handle notifying delegate and maintaining favicon. BUG=1076463 TEST=covered by weblayer_browsertests Change-Id: I74bce59a6a46c38000b37b028a2d3e7797680e33 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2337275 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by:Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/heads/master@{#795110}
Showing
132 Bytes