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

Unified Diff: components/image_fetcher/image_fetcher.h

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: fix dependencies 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
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..d1c8a035413f68522e93bba76c95449bb1ab7ede 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,12 @@ 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).
+ 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(

Powered by Google App Engine
This is Rietveld 408576698