Chromium Code Reviews| 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 79355d67eb6f506ec200aaf93ee6da593e1f528b..bc8cbf40f66cc7b8caf469c76b9e530b76fe7d5a 100644 |
| --- a/ui/base/resource/resource_bundle_win.cc |
| +++ b/ui/base/resource/resource_bundle_win.cc |
| @@ -9,6 +9,7 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/base/resource/resource_data_dll_win.h" |
| #include "ui/base/win/dpi.h" |
| +#include "ui/base/win/metro.h" |
| namespace ui { |
| @@ -42,12 +43,23 @@ void ResourceBundle::LoadCommonResources() { |
| use_hidpi_pak = ui::GetDPIScale() > 1.5; |
| #endif |
| - if (!use_hidpi_pak) { |
| - AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak")); |
| - AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak")); |
| - } else { |
| + bool use_metro_pak = false; |
| +#if defined(ENABLE_METRO) |
|
robertshield
2012/04/19 20:16:35
do we need this here? feels like it would be clean
sail
2012/04/24 04:53:36
Joi has a patch out that cleans this up:
http://co
|
| + use_metro_pak = ui::IsInMetroMode(); |
| +#endif |
| + |
| + if (use_metro_pak) { |
| + AddDataPack(GetResourcesPakFilePath("theme_resources_metro_1x.pak")); |
| + } else if (use_hidpi_pak) { |
| AddDataPack(GetResourcesPakFilePath("theme_resources_2x.pak")); |
| + } else { |
| + AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak")); |
| + } |
| + |
| + if (use_hidpi_pak) { |
| AddDataPack(GetResourcesPakFilePath("ui_resources_2x.pak")); |
| + } else { |
| + AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak")); |
| } |
| } |