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

Unified Diff: components/arc/intent_helper/font_size_util.h

Issue 1843563003: Move arc_intent_helper_bridge.h from c/b/chromeos/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a comment Created 4 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
Index: components/arc/intent_helper/font_size_util.h
diff --git a/components/arc/intent_helper/font_size_util.h b/components/arc/intent_helper/font_size_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7cc9ef8cbbe4a284028284fca388c71d4651fb4
--- /dev/null
+++ b/components/arc/intent_helper/font_size_util.h
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_
+#define COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_
+
+namespace arc {
+
+// The following values were obtained from chrome://settings and Android's
+// Display settings on Nov 2015. They are expected to remain stable.
+const float kAndroidFontScaleSmall = 0.85;
+const float kAndroidFontScaleNormal = 1;
+const float kAndroidFontScaleLarge = 1.15;
+const float kAndroidFontScaleHuge = 1.3;
+const int kChromeFontSizeNormal = 16;
+const int kChromeFontSizeLarge = 20;
+const int kChromeFontSizeVeryLarge = 24;
+
+// Android has only a single float value for system-wide font size
+// (font_scale). Chrome has three main int pixel values that affect
+// system-wide font size. We will take the largest font value of the three
+// main font values on Chrome and convert to an Android size.
+double ConvertFontSizeChromeToAndroid(int default_size,
+ int default_fixed_size,
+ int minimum_size);
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_
« no previous file with comments | « components/arc/intent_helper/arc_intent_helper_bridge.cc ('k') | components/arc/intent_helper/font_size_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698