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

Unified Diff: ui/base/layout.cc

Issue 10412004: Revert "Revert 137734 - Select theme resources from ResourceBundle at requested scale factor." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass float scale_factor to ImageSkia. Created 8 years, 7 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
Index: ui/base/layout.cc
diff --git a/ui/base/layout.cc b/ui/base/layout.cc
index e0e6471a09492d3f3f5cf02e4adf3b52262e3796..30eff813bb089a7964b16d739e5b0997e294f9bf 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -20,6 +20,7 @@
#endif // defined(OS_WIN)
namespace {
+
// Helper function that determines whether we want to optimize the UI for touch.
bool UseTouchOptimizedUI() {
// If --touch-optimized-ui is specified and not set to "auto", then override
@@ -54,6 +55,9 @@ bool UseTouchOptimizedUI() {
return false;
#endif
}
+
+const float kScaleFactorScales[] = {1.0, 2.0};
+
}
namespace ui {
@@ -75,4 +79,8 @@ DisplayLayout GetDisplayLayout() {
#endif
}
+float GetScaleFactorScale(ScaleFactor scale_factor) {
+ return kScaleFactorScales[scale_factor];
sky 2012/05/22 15:49:45 If you're going to use ScaleFactor as an index int
flackr 2012/05/22 17:29:40 Done.
+}
+
} // namespace ui
« ui/base/layout.h ('K') | « ui/base/layout.h ('k') | ui/base/resource/data_pack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698