Commit a034b70b authored by oshima@chromium.org's avatar oshima@chromium.org

[Cleanup] Don't try to load obsolete touch resources.

 Touch UI has been removed long time ago, and this CL removes
the code that used to load resources for Touch UI.

 I'll remove the assets in separate CL.

BUG=none
R=girard@chromium.org

Review URL: https://codereview.chromium.org/133053002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244314 0039d316-1c4b-4281-b951-d872f2087c98
parent 3ec729e5
...@@ -38,36 +38,9 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) { ...@@ -38,36 +38,9 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) {
void ResourceBundle::LoadCommonResources() { void ResourceBundle::LoadCommonResources() {
// As a convenience, add the current resource module as a data packs. // As a convenience, add the current resource module as a data packs.
data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL()));
// Have high-DPI resources for 140% and 180% scaling on Windows based on AddDataPackFromPath(
// default scaling for Metro mode. If high-DPI mode is enabled, load resource GetResourcesPakFilePath("chrome_100_percent.pak"),
// pak closest to the desired scale factor. The high-DPI resources are SCALE_FACTOR_100P);
// scaled up from 100% touch.
float scale = gfx::win::GetDeviceScaleFactor();
bool force_touch_resources = false;
switch(ui::GetSupportedScaleFactor(scale)) {
case ui::SCALE_FACTOR_180P:
AddDataPackFromPath(GetResourcesPakFilePath(
"chrome_touch_180_percent.pak"),
SCALE_FACTOR_180P);
force_touch_resources = true;
break;
case ui::SCALE_FACTOR_140P:
AddDataPackFromPath(GetResourcesPakFilePath(
"chrome_touch_140_percent.pak"),
SCALE_FACTOR_140P);
force_touch_resources = true;
}
// TODO(kevers|girard): Remove loading of 1x resources when in high-DPI
// mode once all resources are available at 140% and 180%.
if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH || force_touch_resources) {
AddDataPackFromPath(
GetResourcesPakFilePath("chrome_touch_100_percent.pak"),
SCALE_FACTOR_100P);
} else {
AddDataPackFromPath(
GetResourcesPakFilePath("chrome_100_percent.pak"),
SCALE_FACTOR_100P);
}
} }
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment