summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-09 00:03:15 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-09 00:03:15 +0000
commita1dc0bc2ae61d9f23e4edce7f13e0d00f633c2c5 (patch)
treebb6f6e90baaf8ddd736c77b6a9cb702bed3b229a /chrome/browser/browser_about_handler.cc
parent06479834b913a081780e145d94ab39f0d4b01941 (diff)
downloadchromium_src-a1dc0bc2ae61d9f23e4edce7f13e0d00f633c2c5.zip
chromium_src-a1dc0bc2ae61d9f23e4edce7f13e0d00f633c2c5.tar.gz
chromium_src-a1dc0bc2ae61d9f23e4edce7f13e0d00f633c2c5.tar.bz2
Make about:plugin page get rendered properly in Hebrew and Arabic Chrome. Also make it use the same font as other 'domUI' pages.
While doing so, get rid of some unnecessary string conversions in browser_about_handler.cc BUG=31782 TEST=Run Chrome with --lang=ar / --lang=he on Windows (or LANGUAGE=ar or LANGUAGE=he on Linux) and go to 'about:plugins' page. The page should be properly 'RTLized'. Review URL: http://codereview.chromium.org/523153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc28
1 files changed, 12 insertions, 16 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index e349506..e98e5bc 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -357,11 +357,13 @@ std::string AboutPlugins() {
localized_strings.SetString(L"enabled_no",
l10n_util::GetString(IDS_ABOUT_PLUGINS_ENABLED_NO));
+ ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings);
+
static const base::StringPiece plugins_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_ABOUT_PLUGINS_HTML));
- return jstemplate_builder::GetTemplateHtml(
+ return jstemplate_builder::GetTemplatesHtml(
plugins_html, &localized_strings, "t" /* template root node id */);
}
@@ -496,14 +498,13 @@ std::string AboutVersion(DictionaryValue* localized_strings) {
return std::string();
}
- std::wstring webkit_version = UTF8ToWide(webkit_glue::GetWebKitVersion());
+ std::string webkit_version = webkit_glue::GetWebKitVersion();
#ifdef CHROME_V8
- const char* v8_vers = v8::V8::GetVersion();
- std::wstring js_version = UTF8ToWide(v8_vers);
- std::wstring js_engine = L"V8";
+ std::string js_version(v8::V8::GetVersion());
+ std::string js_engine = "V8";
#else
- std::wstring js_version = webkit_version;
- std::wstring js_engine = L"JavaScriptCore";
+ std::string js_version = webkit_version;
+ std::string js_engine = "JavaScriptCore";
#endif
localized_strings->SetString(L"name",
@@ -526,20 +527,15 @@ std::string AboutVersion(DictionaryValue* localized_strings) {
localized_strings->SetString(L"official",
l10n_util::GetString(IDS_ABOUT_VERSION_UNOFFICIAL));
}
- localized_strings->SetString(L"useragent",
- UTF8ToWide(webkit_glue::GetUserAgent(GURL())));
+ localized_strings->SetString(L"useragent", webkit_glue::GetUserAgent(GURL(),
+ g_browser_process->GetApplicationLocale()));
static const std::string version_html(
ResourceBundle::GetSharedInstance().GetDataResource(
IDR_ABOUT_VERSION_HTML));
- std::string output = version_html;
- jstemplate_builder::AppendJsonHtml(localized_strings, &output);
- jstemplate_builder::AppendI18nTemplateSourceHtml(&output);
- jstemplate_builder::AppendI18nTemplateProcessHtml(&output);
- jstemplate_builder::AppendJsTemplateSourceHtml(&output);
- jstemplate_builder::AppendJsTemplateProcessHtml("t", &output);
- return output;
+ return jstemplate_builder::GetTemplatesHtml(
+ version_html, localized_strings, "t" /* template root node id */);
}
static void AddBoolSyncDetail(ListValue* details, const std::wstring& stat_name,