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

Unified Diff: chrome/browser/manifest/manifest_icon_downloader.h

Issue 1308533006: webapps: allow callers of icon downloader/selector to specify a minimum size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapps-splashscreen-icon
Patch Set: Address review comments Created 5 years, 3 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: chrome/browser/manifest/manifest_icon_downloader.h
diff --git a/chrome/browser/manifest/manifest_icon_downloader.h b/chrome/browser/manifest/manifest_icon_downloader.h
index f8d7c9756907b464e063d513f12a0499250913d0..fa7b38f74c5db752c0c18ccfef9bef78646519cf 100644
--- a/chrome/browser/manifest/manifest_icon_downloader.h
+++ b/chrome/browser/manifest/manifest_icon_downloader.h
@@ -25,7 +25,8 @@ class GURL;
// file contains multiple icons then it attempts to pick the one closest in size
// bigger than or equal to ideal_icon_size_in_dp, taking into account the
// density of the device. If a bigger icon is chosen then, the icon is scaled
-// down to be equal to ideal_icon_size_in_dp.
+// down to be equal to ideal_icon_size_in_dp. Smaller icons will be chosen down
+// to the value specified by |minimum_icon_size_in_dp|.
class ManifestIconDownloader final {
public:
using IconFetchCallback = base::Callback<void(const SkBitmap&)>;
@@ -39,6 +40,7 @@ class ManifestIconDownloader final {
static bool Download(content::WebContents* web_contents,
const GURL& icon_url,
int ideal_icon_size_in_dp,
+ int minimum_icon_size_in_dp,
const IconFetchCallback& callback);
private:

Powered by Google App Engine
This is Rietveld 408576698