From 7cf1b6ced3b14cce1d66ca0ddc713851f0d37536 Mon Sep 17 00:00:00 2001
From: "ben@chromium.org"
 <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat, 20 Mar 2010 06:37:01 +0000
Subject: Move RTL related functions from app/l10n_util to base/i18n/rtl

TBR=darin
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/1073005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
---
 views/window/window_gtk.cc | 3 ++-
 views/window/window_win.cc | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'views/window')

diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc
index 38e0d82..a7ef80d 100644
--- a/views/window/window_gtk.cc
+++ b/views/window/window_gtk.cc
@@ -6,6 +6,7 @@
 
 #include "app/l10n_util.h"
 #include "gfx/rect.h"
+#include "base/i18n/rtl.h"
 #include "base/utf_string_conversions.h"
 #include "gfx/path.h"
 #include "views/event.h"
@@ -203,7 +204,7 @@ void WindowGtk::UpdateWindowTitle() {
   // the native frame is being used, since this also updates the taskbar, etc.
   std::wstring window_title = window_delegate_->GetWindowTitle();
   std::wstring localized_text;
-  if (l10n_util::AdjustStringForLocaleDirection(window_title, &localized_text))
+  if (base::i18n::AdjustStringForLocaleDirection(window_title, &localized_text))
     window_title.assign(localized_text);
 
   gtk_window_set_title(GetNativeWindow(), WideToUTF8(window_title).c_str());
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 9a8cdcb..b58bcd4 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -13,6 +13,7 @@
 #include "app/resource_bundle.h"
 #include "app/theme_provider.h"
 #include "app/win_util.h"
+#include "base/i18n/rtl.h"
 #include "base/win_util.h"
 #include "gfx/icon_util.h"
 #include "gfx/path.h"
@@ -405,7 +406,7 @@ void WindowWin::UpdateWindowTitle() {
   // the native frame is being used, since this also updates the taskbar, etc.
   std::wstring window_title = window_delegate_->GetWindowTitle();
   std::wstring localized_text;
-  if (l10n_util::AdjustStringForLocaleDirection(window_title, &localized_text))
+  if (base::i18n::AdjustStringForLocaleDirection(window_title, &localized_text))
     window_title.assign(localized_text);
   SetWindowText(GetNativeView(), window_title.c_str());
 }
@@ -991,7 +992,7 @@ void WindowWin::OnRButtonUp(UINT ht_component, const CPoint& point) {
                                MAKELPARAM(screen_point.x, screen_point.y));
     if (ht_component == HTCAPTION || ht_component == HTSYSMENU) {
       UINT flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD;
-      if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+      if (base::i18n::IsRTL())
         flags |= TPM_RIGHTALIGN;
       HMENU system_menu = GetSystemMenu(GetNativeView(), FALSE);
       int id = TrackPopupMenu(system_menu, flags, screen_point.x,
-- 
cgit v1.1