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

Unified Diff: ui/base/layout.cc

Issue 11360233: Ensure that favicons always have 1x representation regardless of whether the platform supports it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « chrome/browser/favicon/favicon_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout.cc
diff --git a/ui/base/layout.cc b/ui/base/layout.cc
index a17ffc638219b87c75ff8b9ecc3a74935e25a157..40da14d465bb0e03c5fada79659c759d8e243ecf 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -73,8 +73,10 @@ std::vector<ScaleFactor>& GetSupportedScaleFactorsInternal() {
static std::vector<ScaleFactor>* supported_scale_factors =
new std::vector<ScaleFactor>();
if (supported_scale_factors->empty()) {
- // 100P is always a supported scale factor.
+#if !defined(OS_IOS)
+ // On platforms other than iOS, 100P is always a supported scale factor.
supported_scale_factors->push_back(SCALE_FACTOR_100P);
+#endif
#if defined(OS_IOS)
// TODO(ios): 100p should not be necessary on iOS retina devices. However
@@ -85,6 +87,8 @@ std::vector<ScaleFactor>& GetSupportedScaleFactorsInternal() {
if (display.device_scale_factor() > 1.0) {
DCHECK_EQ(2.0, display.device_scale_factor());
supported_scale_factors->push_back(SCALE_FACTOR_200P);
+ } else {
+ supported_scale_factors->push_back(SCALE_FACTOR_100P);
}
#elif defined(OS_MACOSX)
if (base::mac::IsOSLionOrLater())
« no previous file with comments | « chrome/browser/favicon/favicon_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698