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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 8493026: Revert r108760 / reland r108744, r108753 w/ fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename plugin list accessor to plugin_list() Created 9 years, 1 month 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 | « chrome/common/chrome_content_client.h ('k') | chrome/common/default_plugin.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index a015b759d3de4906ea4e76d54b37925aa3c2c6d6..65b004b3ede042d7c5f9f3ceb30305b025eaa03f 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -12,17 +12,20 @@
#include "base/stringprintf.h"
#include "base/string_split.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/render_messages.h"
+#include "chrome/default_plugin/plugin_main.h"
#include "content/public/common/pepper_plugin_info.h"
#include "remoting/client/plugin/pepper_entrypoints.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/glue/user_agent.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/plugin_constants.h"
#if defined(OS_WIN)
@@ -266,6 +269,37 @@ void ChromeContentClient::AddPepperPlugins(
AddOutOfProcessFlash(plugins);
}
+void ChromeContentClient::AddNPAPIPlugins(
+ webkit::npapi::PluginList* plugin_list) {
+#if defined(OS_WIN) && !defined(USE_AURA)
+ // TODO(bauerb): On Windows the default plug-in can download and install
+ // missing plug-ins, which we don't support in the browser yet, so keep
+ // using the default plug-in on Windows until we do.
+ // Aura isn't going to support NPAPI plugins.
+ const webkit::npapi::PluginEntryPoints entry_points = {
+ default_plugin::NP_GetEntryPoints,
+ default_plugin::NP_Initialize,
+ default_plugin::NP_Shutdown
+ };
+
+ webkit::WebPluginInfo info;
+ info.path = FilePath(webkit::npapi::kDefaultPluginLibraryName);
+ info.name = ASCIIToUTF16("Default Plug-in");
+ info.version = ASCIIToUTF16("1");
+ info.desc = ASCIIToUTF16("Provides functionality for installing third-party "
+ "plug-ins");
+
+ webkit::WebPluginMimeType mimeType;
+ mimeType.mime_type = "*";
+ info.mime_types.push_back(mimeType);
+
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
+ info,
+ entry_points,
+ false);
+#endif
+}
+
bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* msg) {
// Any Chrome-specific messages that must be allowed to be sent from swapped
// out renderers.
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/common/default_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698