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

Unified Diff: chrome/browser/views/frame/browser_view.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
« no previous file with comments | « chrome/browser/views/edit_search_engine_dialog.cc ('k') | chrome/browser/views/go_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 42180)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -14,6 +14,7 @@
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
+#include "base/i18n/rtl.h"
#include "base/keyboard_codes.h"
#include "base/time.h"
#include "build/build_config.h"
@@ -211,7 +212,7 @@
SkBitmap* bitmap = ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_TEXTAREA_RESIZER);
bitmap->buildMipMap(false);
- bool rtl_dir = (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT);
+ bool rtl_dir = base::i18n::IsRTL();
if (rtl_dir) {
canvas->TranslateInt(width(), 0);
canvas->ScaleInt(-1, 1);
@@ -930,7 +931,7 @@
gfx::Rect client_rect = contents_split_->bounds();
gfx::Size resize_corner_size = ResizeCorner::GetSize();
int x = client_rect.width() - resize_corner_size.width();
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ if (base::i18n::IsRTL())
x = 0;
return gfx::Rect(x, client_rect.height() - resize_corner_size.height(),
resize_corner_size.width(), resize_corner_size.height());
@@ -1548,7 +1549,7 @@
gfx::Rect resize_corner_rect(client_rect.right - resize_corner_size.width(),
client_rect.bottom - resize_corner_size.height(),
resize_corner_size.width(), resize_corner_size.height());
- bool rtl_dir = (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT);
+ bool rtl_dir = base::i18n::IsRTL();
if (rtl_dir)
resize_corner_rect.set_x(0);
if (resize_corner_rect.Contains(point)) {
« no previous file with comments | « chrome/browser/views/edit_search_engine_dialog.cc ('k') | chrome/browser/views/go_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698