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

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 6878089: Add and use a base::i18n::StringWithDirection for carrying titles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 9 years, 8 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: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 4d9b7fd3bdc432281ca5873c40ad3896c57c0079..a7a0fc7c35a379f16796047fa7f2a67fc45c7477 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -1008,8 +1008,12 @@ void RenderViewHost::OnMsgUpdateTitle(
NOTREACHED() << "Renderer sent too many characters in title.";
return;
}
-
- delegate_->UpdateTitle(this, page_id, title, title_direction);
+ base::i18n::TextDirection dir =
+ title_direction == WebKit::WebTextDirectionLeftToRight ?
+ base::i18n::LEFT_TO_RIGHT :
+ base::i18n::RIGHT_TO_LEFT;
+ delegate_->UpdateTitle(this, page_id,
+ base::i18n::String16WithDirection(title, dir));
}
void RenderViewHost::OnMsgUpdateEncoding(const std::string& encoding_name) {

Powered by Google App Engine
This is Rietveld 408576698