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

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: Move IsSupportedScale to ui\base\layout.cc/.h 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
« no previous file with comments | « 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..781ab64d4309868c73b2e2d1062b6391e4ff8533 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -92,6 +92,13 @@ float GetScaleForScaleFactor(ScaleFactor scale_factor) {
return kScaleFactorScales[scale_factor];
}
+bool IsSupportedScale(float scale) {
+ const std::vector<float>& supported_scales =
+ gfx::ImageSkia::GetSupportedScales();
sky 2015/03/25 14:49:10 Why are you using ImageSkia and not g_supported_sc
ananta 2015/03/25 16:56:05 Done.
+ return std::find(supported_scales.begin(), supported_scales.end(), scale)
+ != supported_scales.end();
+}
+
namespace test {
ScopedSetSupportedScaleFactors::ScopedSetSupportedScaleFactors(
« no previous file with comments | « ui/base/layout.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698