| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "ui/base/resource/resource_bundle.h" | 71 #include "ui/base/resource/resource_bundle.h" |
| 72 #include "v8/include/v8.h" | 72 #include "v8/include/v8.h" |
| 73 #include "webkit/glue/webkit_glue.h" | 73 #include "webkit/glue/webkit_glue.h" |
| 74 #include "webkit/plugins/webplugininfo.h" | 74 #include "webkit/plugins/webplugininfo.h" |
| 75 #include "webkit/user_agent/user_agent_util.h" | 75 #include "webkit/user_agent/user_agent_util.h" |
| 76 | 76 |
| 77 #if defined(ENABLE_THEMES) | 77 #if defined(ENABLE_THEMES) |
| 78 #include "chrome/browser/ui/webui/theme_source.h" | 78 #include "chrome/browser/ui/webui/theme_source.h" |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 #if defined(OS_ANDROID) |
| 82 #include "base/android/build_info.h" |
| 83 #include "chrome/browser/ui/android/android_about_app_info.h" |
| 84 #endif |
| 85 |
| 81 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 86 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 82 #include "content/public/browser/zygote_host_linux.h" | 87 #include "content/public/browser/zygote_host_linux.h" |
| 83 #include "content/public/common/sandbox_linux.h" | 88 #include "content/public/common/sandbox_linux.h" |
| 84 #endif | 89 #endif |
| 85 | 90 |
| 86 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
| 87 #include "chrome/browser/enumerate_modules_model_win.h" | 92 #include "chrome/browser/enumerate_modules_model_win.h" |
| 88 #endif | 93 #endif |
| 89 | 94 |
| 90 #if defined(OS_CHROMEOS) | 95 #if defined(OS_CHROMEOS) |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 } | 1128 } |
| 1124 | 1129 |
| 1125 // Used as a callback for PluginService::GetPlugins(). | 1130 // Used as a callback for PluginService::GetPlugins(). |
| 1126 void HandleAboutVersionStrings(AboutUIHTMLSource* source, | 1131 void HandleAboutVersionStrings(AboutUIHTMLSource* source, |
| 1127 int request_id, | 1132 int request_id, |
| 1128 const std::vector<webkit::WebPluginInfo>&) { | 1133 const std::vector<webkit::WebPluginInfo>&) { |
| 1129 #if defined(OS_CHROMEOS) | 1134 #if defined(OS_CHROMEOS) |
| 1130 new ChromeOSAboutVersionHandler(source, request_id); | 1135 new ChromeOSAboutVersionHandler(source, request_id); |
| 1131 #else | 1136 #else |
| 1132 DictionaryValue localized_strings; | 1137 DictionaryValue localized_strings; |
| 1138 #if defined(OS_ANDROID) |
| 1139 localized_strings.SetString("application", |
| 1140 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_APPLICATION)); |
| 1141 base::android::BuildInfo* android_build_info = |
| 1142 base::android::BuildInfo::GetInstance(); |
| 1143 localized_strings.SetString("app_label", |
| 1144 android_build_info->package_label()); |
| 1145 localized_strings.SetString("app_version", |
| 1146 android_build_info->package_version_name()); |
| 1147 localized_strings.SetString("os_version", AndroidAboutAppInfo::GetOsInfo()); |
| 1148 #else |
| 1133 localized_strings.SetString("os_version", ""); | 1149 localized_strings.SetString("os_version", ""); |
| 1150 #endif |
| 1134 source->FinishDataRequest( | 1151 source->FinishDataRequest( |
| 1135 AboutVersionStrings(&localized_strings, source->profile()), | 1152 AboutVersionStrings(&localized_strings, source->profile()), |
| 1136 request_id); | 1153 request_id); |
| 1137 #endif | 1154 #endif |
| 1138 } | 1155 } |
| 1139 | 1156 |
| 1140 // AboutMemoryHandler ---------------------------------------------------------- | 1157 // AboutMemoryHandler ---------------------------------------------------------- |
| 1141 | 1158 |
| 1142 // Helper for AboutMemory to bind results from a ProcessMetrics object | 1159 // Helper for AboutMemory to bind results from a ProcessMetrics object |
| 1143 // to a DictionaryValue. Fills ws_usage and comm_usage so that the objects | 1160 // to a DictionaryValue. Fills ws_usage and comm_usage so that the objects |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 #endif | 1486 #endif |
| 1470 | 1487 |
| 1471 web_ui->AddMessageHandler(new VersionDOMHandler()); | 1488 web_ui->AddMessageHandler(new VersionDOMHandler()); |
| 1472 | 1489 |
| 1473 ChromeURLDataManager::DataSource* source = | 1490 ChromeURLDataManager::DataSource* source = |
| 1474 new AboutUIHTMLSource(name, profile); | 1491 new AboutUIHTMLSource(name, profile); |
| 1475 if (source) { | 1492 if (source) { |
| 1476 ChromeURLDataManager::AddDataSource(profile, source); | 1493 ChromeURLDataManager::AddDataSource(profile, source); |
| 1477 } | 1494 } |
| 1478 } | 1495 } |
| OLD | NEW |