Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1908)

Unified Diff: components/image_fetcher/image_fetcher.h

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: comment formatting Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/image_fetcher/image_decoder.h ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/image_fetcher/image_fetcher.h
diff --git a/components/image_fetcher/image_fetcher.h b/components/image_fetcher/image_fetcher.h
index 9529bc1b8a1960c67a39791c2c63982535b0ecfe..3626c3af70470e9bd87a861621a2b2f3cca34549 100644
--- a/components/image_fetcher/image_fetcher.h
+++ b/components/image_fetcher/image_fetcher.h
@@ -15,6 +15,7 @@
namespace gfx {
class Image;
+class Size;
}
namespace image_fetcher {
@@ -34,6 +35,14 @@ class ImageFetcher {
virtual void SetDataUseServiceName(
DataUseServiceName data_use_service_name) = 0;
+ // Sets the desired size for images with multiple frames (like .ico files).
+ // By default, the image fetcher choses smaller images. Override to choose a
+ // frame with a size as close as possible to |size| (trying to take one in
+ // larger size if there's no precise match). Passing gfx::Size() as
+ // |size| is also supported and will result in chosing the smallest available
+ // size.
+ virtual void SetDesiredImageFrameSize(const gfx::Size& size) = 0;
+
// An empty gfx::Image will be returned to the callback in case the image
// could not be fetched.
virtual void StartOrQueueNetworkRequest(
« no previous file with comments | « components/image_fetcher/image_decoder.h ('k') | components/image_fetcher/image_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698