| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 root->SetBoolean("show_other_browsers", | 933 root->SetBoolean("show_other_browsers", |
| 934 browser_defaults::kShowOtherBrowsersInAboutMemory); | 934 browser_defaults::kShowOtherBrowsersInAboutMemory); |
| 935 | 935 |
| 936 DictionaryValue load_time_data; | 936 DictionaryValue load_time_data; |
| 937 load_time_data.SetString( | 937 load_time_data.SetString( |
| 938 "summary_desc", | 938 "summary_desc", |
| 939 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); | 939 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); |
| 940 web_ui_util::SetFontAndTextDirection(&load_time_data); | 940 web_ui_util::SetFontAndTextDirection(&load_time_data); |
| 941 load_time_data.Set("jstemplateData", root.release()); | 941 load_time_data.Set("jstemplateData", root.release()); |
| 942 | 942 |
| 943 jstemplate_builder::UseVersion2 version2; | 943 webui::UseVersion2 version2; |
| 944 std::string data; | 944 std::string data; |
| 945 jstemplate_builder::AppendJsonJS(&load_time_data, &data); | 945 webui::AppendJsonJS(&load_time_data, &data); |
| 946 callback_.Run(base::RefCountedString::TakeString(&data)); | 946 callback_.Run(base::RefCountedString::TakeString(&data)); |
| 947 } | 947 } |
| 948 | 948 |
| 949 } // namespace | 949 } // namespace |
| 950 | 950 |
| 951 // AboutUIHTMLSource ---------------------------------------------------------- | 951 // AboutUIHTMLSource ---------------------------------------------------------- |
| 952 | 952 |
| 953 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, | 953 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, |
| 954 Profile* profile) | 954 Profile* profile) |
| 955 : source_name_(source_name), | 955 : source_name_(source_name), |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 | 1041 |
| 1042 #if defined(ENABLE_THEMES) | 1042 #if defined(ENABLE_THEMES) |
| 1043 // Set up the chrome://theme/ source. | 1043 // Set up the chrome://theme/ source. |
| 1044 ThemeSource* theme = new ThemeSource(profile); | 1044 ThemeSource* theme = new ThemeSource(profile); |
| 1045 ChromeURLDataManager::AddDataSource(profile, theme); | 1045 ChromeURLDataManager::AddDataSource(profile, theme); |
| 1046 #endif | 1046 #endif |
| 1047 | 1047 |
| 1048 ChromeURLDataManager::AddDataSource( | 1048 ChromeURLDataManager::AddDataSource( |
| 1049 profile, new AboutUIHTMLSource(name, profile)); | 1049 profile, new AboutUIHTMLSource(name, profile)); |
| 1050 } | 1050 } |
| OLD | NEW |