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

Unified Diff: ui/base/resource/resource_bundle_win.cc

Issue 133053002: [Cleanup] Don't try to load obsolete touch resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_win.cc
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index df058e6ef59d94d16c71c346c059fa7e8408f18c..3938722df96e731ab21fae491b19edda83655efa 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -38,36 +38,9 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) {
void ResourceBundle::LoadCommonResources() {
// As a convenience, add the current resource module as a data packs.
data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL()));
- // Have high-DPI resources for 140% and 180% scaling on Windows based on
- // default scaling for Metro mode. If high-DPI mode is enabled, load resource
- // pak closest to the desired scale factor. The high-DPI resources are
- // 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);
- }
+ AddDataPackFromPath(
+ GetResourcesPakFilePath("chrome_100_percent.pak"),
+ SCALE_FACTOR_100P);
}
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698