summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc10
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc8
2 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index f4e297c..ed12fda 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -8,8 +8,8 @@
#include <utility>
#include <vector>
-#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/i18n/rtl.h"
#include "base/json/json_reader.h"
#include "base/stats_counters.h"
#include "base/string_util.h"
@@ -1297,13 +1297,13 @@ void RenderViewHost::OnMsgSetTooltipText(
std::wstring wrapped_tooltip_text = tooltip_text;
if (!tooltip_text.empty()) {
if (text_direction_hint == WebKit::WebTextDirectionLeftToRight &&
- l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ base::i18n::IsRTL()) {
// Force the tooltip to have LTR directionality.
- l10n_util::WrapStringWithLTRFormatting(&wrapped_tooltip_text);
+ base::i18n::WrapStringWithLTRFormatting(&wrapped_tooltip_text);
} else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft &&
- l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) {
+ !base::i18n::IsRTL()) {
// Force the tooltip to have RTL directionality.
- l10n_util::WrapStringWithRTLFormatting(&wrapped_tooltip_text);
+ base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text);
}
}
if (view())
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index 3996a8a..84e190f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -10,6 +10,7 @@
#include "app/resource_bundle.h"
#include "base/command_line.h"
#include "base/histogram.h"
+#include "base/i18n/rtl.h"
#include "base/process_util.h"
#include "base/thread.h"
#include "base/win_util.h"
@@ -558,7 +559,7 @@ void RenderWidgetHostViewWin::UpdateCursorIfOverSelf() {
BOOL result = ::ScreenToClient(m_hWnd, &pt);
DCHECK(result);
if (render_widget_host_->GetRootWindowResizerRect().Contains(pt.x, pt.y)) {
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ if (base::i18n::IsRTL())
SetCursor(kCursorResizeLeft);
else
SetCursor(kCursorResizeRight);
@@ -651,8 +652,7 @@ void RenderWidgetHostViewWin::DrawResizeCorner(const gfx::Rect& paint_rect,
canvas.getDevice()->accessBitmap(true).eraseARGB(0, 0, 0, 0);
int x = resize_corner_rect.x() + resize_corner_rect.width() -
bitmap->width();
- bool rtl_dir = (l10n_util::GetTextDirection() ==
- l10n_util::RIGHT_TO_LEFT);
+ bool rtl_dir = base::i18n::IsRTL();
if (rtl_dir) {
canvas.TranslateInt(bitmap->width(), 0);
canvas.ScaleInt(-1, 1);
@@ -1235,7 +1235,7 @@ LRESULT RenderWidgetHostViewWin::OnMouseEvent(UINT message, WPARAM wparam,
render_widget_host_->GetRootWindowResizerRect().
Contains(GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam))) {
WPARAM wparam = HTBOTTOMRIGHT;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ if (base::i18n::IsRTL())
wparam = HTBOTTOMLEFT;
HWND root_hwnd = ::GetAncestor(m_hWnd, GA_ROOT);
if (SendMessage(root_hwnd, WM_NCLBUTTONDOWN, wparam, lparam) == 0)