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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 42180)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -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 @@
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 @@
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 @@
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)
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698