| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/webui/web_ui_util.h" | 5 #include "ui/base/webui/web_ui_util.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 base::win::GetVersion() < base::win::VERSION_VISTA ? | 157 base::win::GetVersion() < base::win::VERSION_VISTA ? |
| 158 IDS_WEB_FONT_SIZE_XP : | 158 IDS_WEB_FONT_SIZE_XP : |
| 159 #endif | 159 #endif |
| 160 IDS_WEB_FONT_SIZE); | 160 IDS_WEB_FONT_SIZE); |
| 161 } | 161 } |
| 162 | 162 |
| 163 std::string GetTextDirection() { | 163 std::string GetTextDirection() { |
| 164 return base::i18n::IsRTL() ? "rtl" : "ltr"; | 164 return base::i18n::IsRTL() ? "rtl" : "ltr"; |
| 165 } | 165 } |
| 166 | 166 |
| 167 void SetFontAndTextDirection(base::DictionaryValue* localized_strings) { | 167 void SetLoadTimeDataDefaults(const std::string& app_locale, |
| 168 base::DictionaryValue* localized_strings) { |
| 168 localized_strings->SetString("fontfamily", GetFontFamily()); | 169 localized_strings->SetString("fontfamily", GetFontFamily()); |
| 169 localized_strings->SetString("fontsize", GetFontSize()); | 170 localized_strings->SetString("fontsize", GetFontSize()); |
| 171 localized_strings->SetString("language", l10n_util::GetLanguage(app_locale)); |
| 170 localized_strings->SetString("textdirection", GetTextDirection()); | 172 localized_strings->SetString("textdirection", GetTextDirection()); |
| 171 } | 173 } |
| 172 | 174 |
| 173 } // namespace webui | 175 } // namespace webui |
| OLD | NEW |