OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 AppendProcess(child_data, &process.processes[index]); | 1031 AppendProcess(child_data, &process.processes[index]); |
1032 } | 1032 } |
1033 | 1033 |
1034 root->SetBoolean("show_other_browsers", | 1034 root->SetBoolean("show_other_browsers", |
1035 browser_defaults::kShowOtherBrowsersInAboutMemory); | 1035 browser_defaults::kShowOtherBrowsersInAboutMemory); |
1036 | 1036 |
1037 base::DictionaryValue load_time_data; | 1037 base::DictionaryValue load_time_data; |
1038 load_time_data.SetString( | 1038 load_time_data.SetString( |
1039 "summary_desc", | 1039 "summary_desc", |
1040 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); | 1040 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); |
1041 webui::SetFontAndTextDirection(&load_time_data); | 1041 const std::string& app_locale = g_browser_process->GetApplicationLocale(); |
| 1042 webui::SetLoadTimeDataDefaults(app_locale, &load_time_data); |
1042 load_time_data.Set("jstemplateData", root.release()); | 1043 load_time_data.Set("jstemplateData", root.release()); |
1043 | 1044 |
1044 std::string data; | 1045 std::string data; |
1045 webui::AppendJsonJS(&load_time_data, &data); | 1046 webui::AppendJsonJS(&load_time_data, &data); |
1046 callback_.Run(base::RefCountedString::TakeString(&data)); | 1047 callback_.Run(base::RefCountedString::TakeString(&data)); |
1047 } | 1048 } |
1048 | 1049 |
1049 } // namespace | 1050 } // namespace |
1050 | 1051 |
1051 // AboutUIHTMLSource ---------------------------------------------------------- | 1052 // AboutUIHTMLSource ---------------------------------------------------------- |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 Profile* profile = Profile::FromWebUI(web_ui); | 1166 Profile* profile = Profile::FromWebUI(web_ui); |
1166 | 1167 |
1167 #if defined(ENABLE_THEMES) | 1168 #if defined(ENABLE_THEMES) |
1168 // Set up the chrome://theme/ source. | 1169 // Set up the chrome://theme/ source. |
1169 ThemeSource* theme = new ThemeSource(profile); | 1170 ThemeSource* theme = new ThemeSource(profile); |
1170 content::URLDataSource::Add(profile, theme); | 1171 content::URLDataSource::Add(profile, theme); |
1171 #endif | 1172 #endif |
1172 | 1173 |
1173 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1174 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
1174 } | 1175 } |
OLD | NEW |