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

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: Merge with master 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
« no previous file with comments | « ui/base/layout.h ('k') | ui/base/resource/data_pack.h » ('j') | 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 fffa271a18eac5fb272e2b5dc59b5562479ddfd6..9e6be4031874c0ab3fb129ee163db44c26dfe73f 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];
+}
+
} // namespace ui
« no previous file with comments | « 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