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/flash_ui.h" | 5 #include "chrome/browser/ui/webui/flash_ui.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "content/public/browser/plugin_service.h" | 33 #include "content/public/browser/plugin_service.h" |
34 #include "content/public/browser/user_metrics.h" | 34 #include "content/public/browser/user_metrics.h" |
35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
36 #include "content/public/browser/web_ui.h" | 36 #include "content/public/browser/web_ui.h" |
37 #include "content/public/browser/web_ui_data_source.h" | 37 #include "content/public/browser/web_ui_data_source.h" |
38 #include "content/public/browser/web_ui_message_handler.h" | 38 #include "content/public/browser/web_ui_message_handler.h" |
39 #include "content/public/common/content_constants.h" | 39 #include "content/public/common/content_constants.h" |
40 #include "content/public/common/webplugininfo.h" | 40 #include "content/public/common/webplugininfo.h" |
41 #include "gpu/config/gpu_info.h" | 41 #include "gpu/config/gpu_info.h" |
42 #include "grit/browser_resources.h" | 42 #include "grit/browser_resources.h" |
| 43 #include "grit/components_strings.h" |
43 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
44 | 45 |
45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
46 #include "base/win/windows_version.h" | 47 #include "base/win/windows_version.h" |
47 #endif | 48 #endif |
48 | 49 |
49 using base::ASCIIToUTF16; | 50 using base::ASCIIToUTF16; |
50 using base::UserMetricsAction; | 51 using base::UserMetricsAction; |
51 using content::GpuDataManager; | 52 using content::GpuDataManager; |
52 using content::PluginService; | 53 using content::PluginService; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 case base::win::VERSION_WIN7: os_label += " 7 or Server 2008 R2"; break; | 256 case base::win::VERSION_WIN7: os_label += " 7 or Server 2008 R2"; break; |
256 case base::win::VERSION_WIN8: os_label += " 8 or Server 2012"; break; | 257 case base::win::VERSION_WIN8: os_label += " 8 or Server 2012"; break; |
257 default: os_label += " UNKNOWN"; break; | 258 default: os_label += " UNKNOWN"; break; |
258 } | 259 } |
259 os_label += " SP" + base::IntToString(os->service_pack().major); | 260 os_label += " SP" + base::IntToString(os->service_pack().major); |
260 if (os->service_pack().minor > 0) | 261 if (os->service_pack().minor > 0) |
261 os_label += "." + base::IntToString(os->service_pack().minor); | 262 os_label += "." + base::IntToString(os->service_pack().minor); |
262 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE) | 263 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE) |
263 os_label += " 64 bit"; | 264 os_label += " 64 bit"; |
264 #endif | 265 #endif |
265 AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label); | 266 AddPair(list, l10n_util::GetStringUTF16(IDS_VERSION_UI_OS), os_label); |
266 | 267 |
267 // Obtain the version of the Flash plugins. | 268 // Obtain the version of the Flash plugins. |
268 std::vector<content::WebPluginInfo> info_array; | 269 std::vector<content::WebPluginInfo> info_array; |
269 PluginService::GetInstance()->GetPluginInfoArray( | 270 PluginService::GetInstance()->GetPluginInfoArray( |
270 GURL(), content::kFlashPluginSwfMimeType, false, &info_array, NULL); | 271 GURL(), content::kFlashPluginSwfMimeType, false, &info_array, NULL); |
271 if (info_array.empty()) { | 272 if (info_array.empty()) { |
272 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed"); | 273 AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed"); |
273 } else { | 274 } else { |
274 PluginPrefs* plugin_prefs = | 275 PluginPrefs* plugin_prefs = |
275 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); | 276 PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 Profile* profile = Profile::FromWebUI(web_ui); | 390 Profile* profile = Profile::FromWebUI(web_ui); |
390 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); | 391 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); |
391 } | 392 } |
392 | 393 |
393 // static | 394 // static |
394 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( | 395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( |
395 ui::ScaleFactor scale_factor) { | 396 ui::ScaleFactor scale_factor) { |
396 // Use the default icon for now. | 397 // Use the default icon for now. |
397 return NULL; | 398 return NULL; |
398 } | 399 } |
OLD | NEW |