diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 07:30:15 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 07:30:15 +0000 |
commit | 5351a49d9762480ab0cd9ce27b8d3cbcd6bbee06 (patch) | |
tree | c9483adbe25aa4d92c72e9a3a637d8e3c049ac52 /ui/base/resource/resource_bundle_mac.mm | |
parent | 295429f88b94666a2239088cdda1cb277d56dafb (diff) | |
download | chromium_src-5351a49d9762480ab0cd9ce27b8d3cbcd6bbee06.zip chromium_src-5351a49d9762480ab0cd9ce27b8d3cbcd6bbee06.tar.gz chromium_src-5351a49d9762480ab0cd9ce27b8d3cbcd6bbee06.tar.bz2 |
Metro/HiDPI: Move 1x icons into separate pak file
Currently all 1x art files are repacked into chrome.pak files.
This is a problem on Windows where we want to choose which pak file to load based on metro and DPI scale.
As a first step this CL does the following:
- add a new enable_hidpi build flag. This allows us to test HiDPI mode on Windows Chrome.
- stop packing theme_resources_standard.pak and ui_resources_standard.pak into chrome.pak
- update the Mac and Windows installer code to package the extra pak files.
Note, I'll be updating the Linux installer script in a separate CL. I'm still looking into the ChromeOS situation.
BUG=114311
TEST=Ran on Windows, and Mac and Linux.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132517
Review URL: http://codereview.chromium.org/10024050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource/resource_bundle_mac.mm')
-rw-r--r-- | ui/base/resource/resource_bundle_mac.mm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm index 5ace3de..6e4002d 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. + // 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 |