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

Unified Diff: extensions/browser/image_loader.h

Issue 2609853003: Load extension icons for more scale factors. (Closed)
Patch Set: more floats Created 3 years, 11 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: extensions/browser/image_loader.h
diff --git a/extensions/browser/image_loader.h b/extensions/browser/image_loader.h
index 8c1f446f3c2270a24a7594f3aec75c3bec95495b..351e30194368fd7fe3e8fb53fbd2710033c5a022 100644
--- a/extensions/browser/image_loader.h
+++ b/extensions/browser/image_loader.h
@@ -49,7 +49,7 @@ class ImageLoader : public KeyedService {
ImageRepresentation(const ExtensionResource& resource,
ResizeCondition resize_condition,
const gfx::Size& desired_size,
- ui::ScaleFactor scale_factor);
+ float scale_factor);
~ImageRepresentation();
// Extension resource to load.
@@ -62,7 +62,7 @@ class ImageLoader : public KeyedService {
gfx::Size desired_size;
// |scale_factor| is used to construct the loaded gfx::ImageSkia.
- ui::ScaleFactor scale_factor;
+ float scale_factor;
};
struct LoadResult;
@@ -87,8 +87,10 @@ class ImageLoader : public KeyedService {
const gfx::Size& max_size,
const ImageLoaderImageCallback& callback);
- // Loads and returns a gfx::Image that has representations at all supported
- // scale factors.
+ // Loads a gfx::Image that has representations at all scale factors we are
+ // likely to care about. That includes every scale for which we pack resources
+ // in ResourceBundle plus the scale for all currently attached displays. The
+ // image is returned via |callback|.
void LoadImageAtEveryScaleFactorAsync(
const Extension* extension,
const gfx::Size& dip_size,

Powered by Google App Engine
This is Rietveld 408576698