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

Unified Diff: chrome/browser/dom_ui/chrome_url_data_manager.cc

Issue 57025: Make the font family and the font size used in dom UI localizable. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/dom_ui/chrome_url_data_manager.h ('k') | chrome/browser/dom_ui/downloads_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/chrome_url_data_manager.cc
===================================================================
--- chrome/browser/dom_ui/chrome_url_data_manager.cc (revision 12792)
+++ chrome/browser/dom_ui/chrome_url_data_manager.cc (working copy)
@@ -9,8 +9,10 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/thread.h"
+#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/common/ref_counted_util.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/url_util.h"
@@ -24,6 +26,8 @@
#include "chrome/personalization/personalization.h"
#endif
+#include "grit/locale_settings.h"
+
// The URL scheme used for internal chrome resources.
// TODO(glen): Choose a better location for this.
static const char kChromeURLScheme[] = "chrome-ui";
@@ -259,6 +263,18 @@
}
// static
+void ChromeURLDataManager::DataSource::SetFontAndTextDirection(
+ DictionaryValue* localized_strings) {
+ localized_strings->SetString(L"fontfamily",
+ l10n_util::GetString(IDS_WEB_FONT_FAMILY));
+ localized_strings->SetString(L"fontsize",
+ l10n_util::GetString(IDS_WEB_FONT_SIZE));
+
+ localized_strings->SetString(L"textdirection",
+ (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ?
+ L"rtl" : L"ltr");
+}
+
URLRequestJob* ChromeURLDataManager::Factory(URLRequest* request,
const std::string& scheme) {
// Try first with a file handler
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.h ('k') | chrome/browser/dom_ui/downloads_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698