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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 6852023: Show version of Flash plugin on about:version. If no flash plugin is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/about_version.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 81239)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -57,6 +57,9 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
#ifdef CHROME_V8
#include "v8/include/v8.h"
#endif
@@ -751,10 +754,30 @@
localized_strings->SetString("name",
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
localized_strings->SetString("version", version_info.Version());
- localized_strings->SetString("version_modifier",
- platform_util::GetVersionStringModifier());
+ {
+ // Bug 79458: Need to evaluate the use of getting the version string on
+ // this thread.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ localized_strings->SetString("version_modifier",
+ platform_util::GetVersionStringModifier());
+ }
localized_strings->SetString("js_engine", js_engine);
localized_strings->SetString("js_version", js_version);
+
+ // Obtain the version of the first enabled Flash plugin.
+ std::vector<webkit::npapi::WebPluginInfo> info_array;
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
+ GURL(), "application/x-shockwave-flash", false, &info_array, NULL);
+ string16 flash_version =
+ l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
+ for (size_t i = 0; i < info_array.size(); ++i) {
+ if (webkit::npapi::IsPluginEnabled(info_array[i])) {
cpu_(ooo_6.6-7.5) 2011/04/15 21:16:33 does this cause the plugin dll to be loaded on thi
+ flash_version = info_array[i].version;
+ break;
+ }
+ }
+ localized_strings->SetString("flash_plugin", "Flash");
+ localized_strings->SetString("flash_version", flash_version);
localized_strings->SetString("webkit_version", webkit_version);
localized_strings->SetString("company",
l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME));
« no previous file with comments | « no previous file | chrome/browser/resources/about_version.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698