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

Unified Diff: components/image_fetcher/image_fetcher.h

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: ax 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 69836385acf20be729c8977025b9c8827216a916..41cd22c49e7d29bc708afb3c973468b566addc69 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 find one that's
+ // larger than |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(

Powered by Google App Engine
This is Rietveld 408576698