Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 7648017: Make WebPluginInfo more generic (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_about_handler.h" 5 #include "chrome/browser/browser_about_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "grit/browser_resources.h" 53 #include "grit/browser_resources.h"
54 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
55 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
56 #include "grit/locale_settings.h" 56 #include "grit/locale_settings.h"
57 #include "net/base/escape.h" 57 #include "net/base/escape.h"
58 #include "net/base/net_util.h" 58 #include "net/base/net_util.h"
59 #include "ui/base/l10n/l10n_util.h" 59 #include "ui/base/l10n/l10n_util.h"
60 #include "ui/base/resource/resource_bundle.h" 60 #include "ui/base/resource/resource_bundle.h"
61 #include "webkit/glue/webkit_glue.h" 61 #include "webkit/glue/webkit_glue.h"
62 #include "webkit/plugins/npapi/plugin_list.h" 62 #include "webkit/plugins/npapi/plugin_list.h"
63 #include "webkit/plugins/npapi/webplugininfo.h" 63 #include "webkit/plugins/webplugininfo.h"
64 64
65 #ifdef CHROME_V8 65 #ifdef CHROME_V8
66 #include "v8/include/v8.h" 66 #include "v8/include/v8.h"
67 #endif 67 #endif
68 68
69 #if defined(OS_WIN) 69 #if defined(OS_WIN)
70 #include "chrome/browser/enumerate_modules_model_win.h" 70 #include "chrome/browser/enumerate_modules_model_win.h"
71 #elif defined(OS_CHROMEOS) 71 #elif defined(OS_CHROMEOS)
72 #include "chrome/browser/chromeos/cros/cros_library.h" 72 #include "chrome/browser/chromeos/cros/cros_library.h"
73 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 73 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 localized_strings->SetString("os_name", 1101 localized_strings->SetString("os_name",
1102 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS)); 1102 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS));
1103 localized_strings->SetString("platform", 1103 localized_strings->SetString("platform",
1104 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL)); 1104 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL));
1105 localized_strings->SetString("os_type", version_info.OSType()); 1105 localized_strings->SetString("os_type", version_info.OSType());
1106 localized_strings->SetString("webkit_version", webkit_version); 1106 localized_strings->SetString("webkit_version", webkit_version);
1107 localized_strings->SetString("js_engine", js_engine); 1107 localized_strings->SetString("js_engine", js_engine);
1108 localized_strings->SetString("js_version", js_version); 1108 localized_strings->SetString("js_version", js_version);
1109 1109
1110 // Obtain the version of the first enabled Flash plugin. 1110 // Obtain the version of the first enabled Flash plugin.
1111 std::vector<webkit::npapi::WebPluginInfo> info_array; 1111 std::vector<webkit::WebPluginInfo> info_array;
1112 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( 1112 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
1113 GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL); 1113 GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL);
1114 string16 flash_version = 1114 string16 flash_version =
1115 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); 1115 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
1116 for (size_t i = 0; i < info_array.size(); ++i) { 1116 for (size_t i = 0; i < info_array.size(); ++i) {
1117 if (webkit::npapi::IsPluginEnabled(info_array[i])) { 1117 if (webkit::IsPluginEnabled(info_array[i])) {
1118 flash_version = info_array[i].version; 1118 flash_version = info_array[i].version;
1119 break; 1119 break;
1120 } 1120 }
1121 } 1121 }
1122 localized_strings->SetString("flash_plugin", "Flash"); 1122 localized_strings->SetString("flash_plugin", "Flash");
1123 localized_strings->SetString("flash_version", flash_version); 1123 localized_strings->SetString("flash_version", flash_version);
1124 localized_strings->SetString("webkit_version", webkit_version); 1124 localized_strings->SetString("webkit_version", webkit_version);
1125 localized_strings->SetString("company", 1125 localized_strings->SetString("company",
1126 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME)); 1126 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME));
1127 localized_strings->SetString("copyright", 1127 localized_strings->SetString("copyright",
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 return false; 1525 return false;
1526 } 1526 }
1527 1527
1528 std::vector<std::string> ChromePaths() { 1528 std::vector<std::string> ChromePaths() {
1529 std::vector<std::string> paths; 1529 std::vector<std::string> paths;
1530 paths.reserve(arraysize(kChromePaths)); 1530 paths.reserve(arraysize(kChromePaths));
1531 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1531 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1532 paths.push_back(kChromePaths[i]); 1532 paths.push_back(kChromePaths[i]);
1533 return paths; 1533 return paths;
1534 } 1534 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/chromeos/gview_request_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698