| 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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 root->SetBoolean("show_other_browsers", | 964 root->SetBoolean("show_other_browsers", |
| 965 browser_defaults::kShowOtherBrowsersInAboutMemory); | 965 browser_defaults::kShowOtherBrowsersInAboutMemory); |
| 966 | 966 |
| 967 base::DictionaryValue load_time_data; | 967 base::DictionaryValue load_time_data; |
| 968 load_time_data.SetString( | 968 load_time_data.SetString( |
| 969 "summary_desc", | 969 "summary_desc", |
| 970 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); | 970 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); |
| 971 webui::SetFontAndTextDirection(&load_time_data); | 971 webui::SetFontAndTextDirection(&load_time_data); |
| 972 load_time_data.Set("jstemplateData", root.release()); | 972 load_time_data.Set("jstemplateData", root.release()); |
| 973 | 973 |
| 974 webui::UseVersion2 version2; | |
| 975 std::string data; | 974 std::string data; |
| 976 webui::AppendJsonJS(&load_time_data, &data); | 975 webui::AppendJsonJS(&load_time_data, &data); |
| 977 callback_.Run(base::RefCountedString::TakeString(&data)); | 976 callback_.Run(base::RefCountedString::TakeString(&data)); |
| 978 } | 977 } |
| 979 | 978 |
| 980 } // namespace | 979 } // namespace |
| 981 | 980 |
| 982 // AboutUIHTMLSource ---------------------------------------------------------- | 981 // AboutUIHTMLSource ---------------------------------------------------------- |
| 983 | 982 |
| 984 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, | 983 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 Profile* profile = Profile::FromWebUI(web_ui); | 1094 Profile* profile = Profile::FromWebUI(web_ui); |
| 1096 | 1095 |
| 1097 #if defined(ENABLE_THEMES) | 1096 #if defined(ENABLE_THEMES) |
| 1098 // Set up the chrome://theme/ source. | 1097 // Set up the chrome://theme/ source. |
| 1099 ThemeSource* theme = new ThemeSource(profile); | 1098 ThemeSource* theme = new ThemeSource(profile); |
| 1100 content::URLDataSource::Add(profile, theme); | 1099 content::URLDataSource::Add(profile, theme); |
| 1101 #endif | 1100 #endif |
| 1102 | 1101 |
| 1103 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1102 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
| 1104 } | 1103 } |
| OLD | NEW |