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

Unified Diff: ui/base/layout.cc

Issue 1025513004: Ensure that the extension icons show up in the omnibox at fractional scales. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use g_supported_scale_factors to verify if the scale passed in is supported. Created 5 years, 9 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
« extensions/browser/extension_icon_image.cc ('K') | « ui/base/layout.h ('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 5aaa7aa4e0006ec99b5b4791f631bb13b99b157b..e49c24bed9b7802c22dd0776e3e956e8997d5f4a 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -92,6 +92,14 @@ float GetScaleForScaleFactor(ScaleFactor scale_factor) {
return kScaleFactorScales[scale_factor];
}
+bool IsSupportedScale(float scale) {
+ for (auto scale_factor_idx : *g_supported_scale_factors) {
+ if (kScaleFactorScales[scale_factor_idx] == scale)
+ return true;
+ }
+ return false;
+}
+
namespace test {
ScopedSetSupportedScaleFactors::ScopedSetSupportedScaleFactors(
« extensions/browser/extension_icon_image.cc ('K') | « ui/base/layout.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698