diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
commit | 7cf1b6ced3b14cce1d66ca0ddc713851f0d37536 (patch) | |
tree | 1c2fc9f4d52bf3046addf820d5eec03a2e150749 /views/window | |
parent | f9f4841b14a9f309ce5ee613f0d4de6afad88767 (diff) | |
download | chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.zip chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.gz chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.bz2 |
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
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/window_gtk.cc | 3 | ||||
-rw-r--r-- | views/window/window_win.cc | 5 |
2 files changed, 5 insertions, 3 deletions
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, |