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

Unified Diff: extensions/browser/image_loader.h

Issue 2609853003: Load extension icons for more scale factors. (Closed)
Patch Set: Created 3 years, 12 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 | « no previous file | extensions/browser/image_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/image_loader.h
diff --git a/extensions/browser/image_loader.h b/extensions/browser/image_loader.h
index 8c1f446f3c2270a24a7594f3aec75c3bec95495b..97384573e373b4cd9921177cdaadc34c76f645ae 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 and returns a gfx::Image that has representations at all scale
Devlin 2017/01/04 15:59:10 And one small nit: this function doesn't return; i
Evan Stade 2017/01/06 21:57:41 Done.
+ // 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.
void LoadImageAtEveryScaleFactorAsync(
const Extension* extension,
const gfx::Size& dip_size,
« no previous file with comments | « no previous file | extensions/browser/image_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698