summaryrefslogtreecommitdiffstats
path: root/base/i18n/rtl.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 00:24:20 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 00:24:20 +0000
commit883ce72de20ef56c3c332215c12f14886b67bf8e (patch)
tree01bb9b4b848f52ad91e4b151f935dbf7f2fa00fd /base/i18n/rtl.h
parent4f2fe461d79175b39787686b76d36b7518e132fd (diff)
downloadchromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.zip
chromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.tar.gz
chromium_src-883ce72de20ef56c3c332215c12f14886b67bf8e.tar.bz2
Small cleanups/style fixes. Simplifies RTL functions slightly.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1932006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/i18n/rtl.h')
-rw-r--r--base/i18n/rtl.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/base/i18n/rtl.h b/base/i18n/rtl.h
index 05a5ff0..70cd9d3 100644
--- a/base/i18n/rtl.h
+++ b/base/i18n/rtl.h
@@ -18,7 +18,6 @@ const char16 kLeftToRightEmbeddingMark = 0x202A;
const char16 kRightToLeftEmbeddingMark = 0x202B;
const char16 kPopDirectionalFormatting = 0x202C;
-// Represents the text direction returned by the GetTextDirection() function.
enum TextDirection {
UNKNOWN_DIRECTION,
RIGHT_TO_LEFT,
@@ -37,21 +36,15 @@ void GetLanguageAndRegionFromOS(std::string* lang, std::string* region);
// that this is called before any locale-dependent API is called.
void SetICUDefaultLocale(const std::string& locale_string);
-// Returns the text direction for the default ICU locale. It is assumed
-// that SetICUDefaultLocale has been called to set the default locale to
-// the UI locale of Chrome. Its return is one of the following three:
-// * LEFT_TO_RIGHT: Left-To-Right (e.g. English, Chinese, etc.);
-// * RIGHT_TO_LEFT: Right-To-Left (e.g. Arabic, Hebrew, etc.), and;
-// * UNKNOWN_DIRECTION: unknown (or error).
-TextDirection GetICUTextDirection();
-
-// Get the application text direction. (This is just the ICU direction,
-// except on GTK.)
-TextDirection GetTextDirection();
-
// Returns true if the application text direction is right-to-left.
bool IsRTL();
+// Returns whether the text direction for the default ICU locale is RTL. This
+// assumes that SetICUDefaultLocale has been called to set the default locale to
+// the UI locale of Chrome.
+// NOTE: Generally, you should call IsRTL() instead of this.
+bool ICUIsRTL();
+
// Returns the text direction for |locale_name|.
TextDirection GetTextDirectionForLocale(const char* locale_name);