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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 211493009: Ensure that extension resources are loaded with the correct scaling applied on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix try server errors Created 6 years, 9 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 | « chrome/browser/extensions/image_loader.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 8b63aa777d30e250fe7e4f4478c39ea7331447aa..3e2e09443a45f57ac3d537614b04d4a1b6d61c69 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -256,6 +256,12 @@ class UI_BASE_EXPORT ResourceBundle {
// Returns SCALE_FACTOR_100P if no resource is loaded.
ScaleFactor GetMaxScaleFactor() const;
+ // Returns the scale to be used for loading an image. In all platforms except
+ // windows this is based on the scale factors of the loaded resource packs.
+ // On Windows this returns the device scale factor if high dpi is enabled.
+ // |scale_factor| contains the loaded scale factor for the image.
+ static float PlatformGetImageScale(ui::ScaleFactor scale_factor);
sky 2014/03/26 13:45:37 This name is wordy (it was before, but when privat
ananta 2014/03/26 19:40:10 Removed this function. Moved this logic to ui::Get
+
private:
FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetPathForLocalePack);
FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetImageNamed);
@@ -363,11 +369,6 @@ class UI_BASE_EXPORT ResourceBundle {
float loaded_image_scale,
float desired_scale);
- // Returns the scale to be used for loading an image. In all platforms except
- // windows this is based on the scale factors of the loaded resource packs.
- // On Windows this returns the device scale factor if high dpi is enabled.
- float PlatformGetImageScale();
-
// This pointer is guaranteed to outlive the ResourceBundle instance and may
// be NULL.
Delegate* delegate_;
« no previous file with comments | « chrome/browser/extensions/image_loader.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698