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

Unified Diff: ui/base/resource/resource_bundle_mac.mm

Issue 10024050: Metro/HiDPI: Move 1x icons into separate pak file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clobber build Created 8 years, 8 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: ui/base/resource/resource_bundle_mac.mm
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
index 5ace3deda3d70794c05027d3ac29cec8542dcd0e..6e4002d0ff8f774400046d8ebf86da41cc17a24c 100644
--- a/ui/base/resource/resource_bundle_mac.mm
+++ b/ui/base/resource/resource_bundle_mac.mm
@@ -44,8 +44,18 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
void ResourceBundle::LoadCommonResources() {
AddDataPack(GetResourcesPakFilePath(@"chrome", nil));
- if (base::mac::IsOSLionOrLater())
+ AddDataPack(GetResourcesPakFilePath(@"theme_resources_standard", nil));
+ AddDataPack(GetResourcesPakFilePath(@"ui_resources_standard", nil));
+
+ // On Windows and ChromeOS we load either the 1x resource or the 2x resource.
Nico 2012/04/23 15:51:25 How do you handle the case of a highdpi monitor be
+ // On Mac we load both and let the UI framework decide which one to use.
+#if defined(ENABLE_HIDPI)
+ if (base::mac::IsOSLionOrLater()) {
AddDataPack(GetResourcesPakFilePath(@"theme_resources_2x", nil));
+ AddDataPack(GetResourcesPakFilePath(@"theme_resources_standard_2x", nil));
+ AddDataPack(GetResourcesPakFilePath(@"ui_resources_standard_2x", nil));
+ }
+#endif
}
// static

Powered by Google App Engine
This is Rietveld 408576698