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

Unified Diff: chrome/browser/views/status_bubble_views.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/views/status_bubble_views.cc
===================================================================
--- chrome/browser/views/status_bubble_views.cc (revision 42180)
+++ chrome/browser/views/status_bubble_views.cc (working copy)
@@ -11,6 +11,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/text_elider.h"
+#include "base/i18n/rtl.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "chrome/browser/browser_theme_provider.h"
@@ -497,7 +498,7 @@
void StatusBubbleViews::SetBounds(int x, int y, int w, int h) {
// If the UI layout is RTL, we need to mirror the position of the bubble
// relative to the parent.
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ if (base::i18n::IsRTL()) {
gfx::Rect frame_bounds;
frame_->GetBounds(&frame_bounds, false);
int mirrored_x = frame_bounds.width() - x - w;
@@ -558,9 +559,8 @@
// An URL is always treated as a left-to-right string. On right-to-left UIs
// we need to explicitly mark the URL as LTR to make sure it is displayed
// correctly.
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT &&
- !url_text_.empty())
- l10n_util::WrapStringWithLTRFormatting(&url_text_);
+ if (base::i18n::IsRTL() && !url_text_.empty())
+ base::i18n::WrapStringWithLTRFormatting(&url_text_);
if (IsFrameVisible())
view_->SetText(url_text_);
« no previous file with comments | « chrome/browser/views/options/passwords_page_view.cc ('k') | chrome/browser/views/tabs/dragged_tab_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698