summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 02:42:14 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 02:42:14 +0000
commitf520b5b5e0822d6ea04edcf064274ac515581806 (patch)
tree778819460ce7ca1fd66f97e2bed0fba0200b7eba /chrome
parent255f8277e7e4f9e19b8f19988ded37e38c932c73 (diff)
downloadchromium_src-f520b5b5e0822d6ea04edcf064274ac515581806.zip
chromium_src-f520b5b5e0822d6ea04edcf064274ac515581806.tar.gz
chromium_src-f520b5b5e0822d6ea04edcf064274ac515581806.tar.bz2
Revert r108760 / reland r108744, r108753 w/ fix
Modify code in chrome to call wrapper functions on PluginService TBR=rsesek@chromium.org, jam@chromium.org BUG=90442 TEST=browser_tests PluginServiceTest.* pass on the Mac Review URL: http://codereview.chromium.org/8493026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_process_impl.cc10
-rw-r--r--chrome/browser/chromeos/gview_request_interceptor_unittest.cc11
-rw-r--r--chrome/browser/component_updater/npapi_flash_component_installer.cc8
-rw-r--r--chrome/browser/component_updater/pepper_flash_component_installer.cc10
-rw-r--r--chrome/browser/extensions/extension_service.cc16
-rw-r--r--chrome/browser/metrics/metrics_service.cc1
-rw-r--r--chrome/browser/plugin_observer.cc1
-rw-r--r--chrome/browser/plugin_prefs.cc2
-rw-r--r--chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm4
-rw-r--r--chrome/browser/ui/gtk/content_setting_bubble_gtk.cc4
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.cc4
-rw-r--r--chrome/chrome_common.gypi2
-rw-r--r--chrome/common/chrome_content_client.cc34
-rw-r--r--chrome/common/chrome_content_client.h2
-rw-r--r--chrome/common/default_plugin.cc44
-rw-r--r--chrome/common/default_plugin.h16
-rw-r--r--chrome/plugin/chrome_content_plugin_client.cc4
17 files changed, 65 insertions, 108 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index d1ef581..984e89f 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -61,7 +61,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/default_plugin.h"
#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/json_pref_store.h"
@@ -90,7 +89,6 @@
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#if defined(OS_WIN)
#include "views/focus/view_storage.h"
@@ -792,15 +790,12 @@ void BrowserProcessImpl::CreateIOThread() {
plugin_service->set_filter(ChromePluginServiceFilter::GetInstance());
plugin_service->StartWatchingPlugins();
- // Add the Chrome specific plugins.
- chrome::RegisterInternalDefaultPlugin();
-
// Register the internal Flash if available.
FilePath path;
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableInternalFlash) &&
PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
+ plugin_service->AddExtraPluginPath(path);
}
#if defined(OS_POSIX)
@@ -808,8 +803,7 @@ void BrowserProcessImpl::CreateIOThread() {
// e.g. ~/.config/chromium/Plugins.
FilePath user_data_dir;
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
- webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(
- user_data_dir.Append("Plugins"));
+ plugin_service->AddExtraPluginPath(user_data_dir.Append("Plugins"));
}
#endif
diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
index eb14534..9c5aed1 100644
--- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -25,7 +25,6 @@
#include "net/url_request/url_request_test_job.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/plugins/npapi/plugin_list.h"
using content::BrowserThread;
@@ -116,7 +115,7 @@ class GViewRequestInterceptorTest : public testing::Test {
handler_ = new content::DummyResourceHandler();
- PluginService::GetInstance()->RefreshPluginList();
+ PluginService::GetInstance()->RefreshPlugins();
PluginService::GetInstance()->GetPlugins(base::Bind(&QuitMessageLoop));
MessageLoop::current()->RunAllPending();
}
@@ -140,17 +139,17 @@ class GViewRequestInterceptorTest : public testing::Test {
void RegisterPDFPlugin() {
webkit::WebPluginInfo info;
info.path = pdf_path_;
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
+ PluginService::GetInstance()->RegisterInternalPlugin(info);
- PluginService::GetInstance()->RefreshPluginList();
+ PluginService::GetInstance()->RefreshPlugins();
PluginService::GetInstance()->GetPlugins(base::Bind(&QuitMessageLoop));
MessageLoop::current()->RunAllPending();
}
void UnregisterPDFPlugin() {
- webkit::npapi::PluginList::Singleton()->UnregisterInternalPlugin(pdf_path_);
+ PluginService::GetInstance()->UnregisterInternalPlugin(pdf_path_);
- PluginService::GetInstance()->RefreshPluginList();
+ PluginService::GetInstance()->RefreshPlugins();
PluginService::GetInstance()->GetPlugins(base::Bind(&QuitMessageLoop));
MessageLoop::current()->RunAllPending();
}
diff --git a/chrome/browser/component_updater/npapi_flash_component_installer.cc b/chrome/browser/component_updater/npapi_flash_component_installer.cc
index 86c68a6..7b4d404 100644
--- a/chrome/browser/component_updater/npapi_flash_component_installer.cc
+++ b/chrome/browser/component_updater/npapi_flash_component_installer.cc
@@ -18,7 +18,6 @@
#include "chrome/common/chrome_paths.h"
#include "content/browser/plugin_service.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
using content::BrowserThread;
@@ -107,7 +106,7 @@ bool NPAPIFlashComponentInstaller::Install(base::DictionaryValue* manifest,
return false;
// Installation is done. Now tell the rest of chrome.
current_version_ = version;
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ PluginService::GetInstance()->RefreshPlugins();
return true;
}
@@ -204,10 +203,9 @@ void StartFlashUpdateRegistration(ComponentUpdateService* cus,
// the information for free.
void RegisterNPAPIFlashComponent(ComponentUpdateService* cus) {
#if !defined(OS_CHROMEOS)
- webkit::npapi::PluginList* plugins = webkit::npapi::PluginList::Singleton();
FilePath path = GetNPAPIFlashBaseDirectory().Append(kFlashPluginFileName);
- plugins->AddExtraPluginPath(path);
- plugins->RefreshPlugins();
+ PluginService::GetInstance()->AddExtraPluginPath(path);
+ PluginService::GetInstance()->RefreshPlugins();
// Post the task to the FILE thread because IO may be done once the plugins
// are loaded.
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index 0cb8e5f..9dd2a9a 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -20,10 +20,10 @@
#include "chrome/browser/component_updater/component_updater_service.h"
#include "chrome/browser/plugin_prefs.h"
#include "chrome/common/chrome_paths.h"
+#include "content/browser/plugin_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/pepper_plugin_info.h"
#include "ppapi/c/private/ppb_pdf.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/plugin_constants.h"
#include "webkit/plugins/ppapi/plugin_module.h"
@@ -167,9 +167,9 @@ void RegisterPepperFlashWithChrome(const FilePath& path,
if (!MakePepperFlashPluginInfo(path, version, true, &plugin_info))
return;
PluginPrefs::EnablePluginGlobally(kEnablePepperFlash, plugin_info.path);
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
+ PluginService::GetInstance()->RegisterInternalPlugin(
plugin_info.ToWebPluginInfo());
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ PluginService::GetInstance()->RefreshPlugins();
}
} // namespace
@@ -321,8 +321,8 @@ void StartPepperFlashUpdateRegistration(ComponentUpdateService* cus) {
} // namespace
void RegisterPepperFlashComponent(ComponentUpdateService* cus) {
-//#if defined(GOOGLE_CHROME_BUILD)
+// #if defined(GOOGLE_CHROME_BUILD)
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableFunction(&StartPepperFlashUpdateRegistration, cus));
-//#endif
+// #endif
}
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 04e028a..4a599a3 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -96,7 +96,6 @@
#include "net/base/registry_controlled_domain.h"
#include "webkit/database/database_tracker.h"
#include "webkit/database/database_util.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/cros/cros_library.h"
@@ -969,8 +968,8 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
bool plugins_changed = false;
for (size_t i = 0; i < extension->plugins().size(); ++i) {
const Extension::PluginInfo& plugin = extension->plugins()[i];
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
+ PluginService::GetInstance()->RefreshPlugins();
+ PluginService::GetInstance()->AddExtraPluginPath(plugin.path);
plugins_changed = true;
ChromePluginServiceFilter* filter =
ChromePluginServiceFilter::GetInstance();
@@ -1068,9 +1067,8 @@ void ExtensionService::NotifyExtensionUnloaded(
if (!BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&ForceShutdownPlugin, plugin.path)))
NOTREACHED();
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
- webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
- plugin.path);
+ PluginService::GetInstance()->RefreshPlugins();
+ PluginService::GetInstance()->RemoveExtraPluginPath(plugin.path);
plugins_changed = true;
ChromePluginServiceFilter::GetInstance()->UnrestrictPlugin(plugin.path);
}
@@ -2449,7 +2447,7 @@ void ExtensionService::UpdatePluginListWithNaClModules() {
if (mime_iter->mime_type == kNaClPluginMimeType) {
// This plugin handles "application/x-nacl".
- webkit::npapi::PluginList::Singleton()->
+ PluginService::GetInstance()->
UnregisterInternalPlugin(pepper_info->path);
webkit::WebPluginInfo info = pepper_info->ToWebPluginInfo();
@@ -2468,8 +2466,8 @@ void ExtensionService::UpdatePluginListWithNaClModules() {
info.mime_types.push_back(mime_type_info);
}
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
+ PluginService::GetInstance()->RefreshPlugins();
+ PluginService::GetInstance()->RegisterInternalPlugin(info);
// This plugin has been modified, no need to check the rest of its
// types, but continue checking other plugins.
break;
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 2342d74..7f2db89 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -181,7 +181,6 @@
#include "content/common/child_process_info.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/url_fetcher.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
// TODO(port): port browser_distribution.h.
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index c909c69..4d81c68 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -22,7 +22,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
namespace {
diff --git a/chrome/browser/plugin_prefs.cc b/chrome/browser/plugin_prefs.cc
index c20886e..94ecb6e 100644
--- a/chrome/browser/plugin_prefs.cc
+++ b/chrome/browser/plugin_prefs.cc
@@ -480,7 +480,7 @@ void PluginPrefs::SetPolicyEnforcedPluginPatterns(
webkit::npapi::PluginList* PluginPrefs::GetPluginList() {
if (plugin_list_)
return plugin_list_;
- return webkit::npapi::PluginList::Singleton();
+ return PluginService::GetInstance()->plugin_list();
}
void PluginPrefs::GetPreferencesDataOnFileThread() {
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index c969a4f..a821e1e 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -13,11 +13,11 @@
#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/l10n_util.h"
+#include "content/browser/plugin_service.h"
#include "grit/generated_resources.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -245,7 +245,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
for (std::set<std::string>::iterator it = plugins.begin();
it != plugins.end(); ++it) {
NSString* name = SysUTF16ToNSString(
- webkit::npapi::PluginList::Singleton()->GetPluginGroupName(*it));
+ PluginService::GetInstance()->GetPluginGroupName(*it));
if ([name length] == 0)
name = base::SysUTF8ToNSString(*it);
[pluginArray addObject:name];
diff --git a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
index 821bf32..b414230 100644
--- a/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/content_setting_bubble_gtk.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/content_settings.h"
+#include "content/browser/plugin_service.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -26,7 +27,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/text/text_elider.h"
#include "ui/gfx/gtk_util.h"
-#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -109,7 +109,7 @@ void ContentSettingBubbleGtk::BuildBubble() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
std::string name = UTF16ToUTF8(
- webkit::npapi::PluginList::Singleton()->GetPluginGroupName(*it));
+ PluginService::GetInstance()->GetPluginGroupName(*it));
if (name.empty())
name = *it;
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index 00843db..a9e327b 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/bubble/bubble.h"
+#include "content/browser/plugin_service.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -32,7 +33,6 @@
#include "views/controls/separator.h"
#include "views/layout/grid_layout.h"
#include "views/layout/layout_constants.h"
-#include "webkit/plugins/npapi/plugin_list.h"
#if defined(TOOLKIT_USES_GTK)
#include "ui/gfx/gtk_util.h"
@@ -217,7 +217,7 @@ void ContentSettingBubbleContents::InitControlLayout() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
string16 name =
- webkit::npapi::PluginList::Singleton()->GetPluginGroupName(*it);
+ PluginService::GetInstance()->GetPluginGroupName(*it);
if (name.empty())
name = UTF8ToUTF16(*it);
layout->StartRow(0, single_column_set_id);
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index b7478fc..f8141db 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -100,8 +100,6 @@
'common/content_settings_types.h',
'common/custom_handlers/protocol_handler.cc',
'common/custom_handlers/protocol_handler.h',
- 'common/default_plugin.cc',
- 'common/default_plugin.h',
'common/extensions/extension.cc',
'common/extensions/extension.h',
'common/extensions/extension_action.cc',
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index a015b75..65b004b 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.
diff --git a/chrome/common/chrome_content_client.h b/chrome/common/chrome_content_client.h
index 5d82037..6c252e1 100644
--- a/chrome/common/chrome_content_client.h
+++ b/chrome/common/chrome_content_client.h
@@ -21,6 +21,8 @@ class ChromeContentClient : public content::ContentClient {
virtual void SetGpuInfo(const content::GPUInfo& gpu_info) OVERRIDE;
virtual void AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) OVERRIDE;
+ virtual void AddNPAPIPlugins(
+ webkit::npapi::PluginList* plugin_list) OVERRIDE;
virtual bool CanSendWhileSwappedOut(const IPC::Message* msg) OVERRIDE;
virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE;
virtual std::string GetUserAgent(bool* overriding) const OVERRIDE;
diff --git a/chrome/common/default_plugin.cc b/chrome/common/default_plugin.cc
deleted file mode 100644
index b9b8fab..0000000
--- a/chrome/common/default_plugin.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/utf_string_conversions.h"
-#include "chrome/common/default_plugin.h"
-#include "chrome/default_plugin/plugin_main.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-
-namespace chrome {
-
-void RegisterInternalDefaultPlugin() {
-#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 = {
-#if !defined(OS_POSIX) || defined(OS_MACOSX)
- default_plugin::NP_GetEntryPoints,
-#endif
- 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
-}
-
-} // namespace chrome
diff --git a/chrome/common/default_plugin.h b/chrome/common/default_plugin.h
deleted file mode 100644
index 6cc8348..0000000
--- a/chrome/common/default_plugin.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_DEFAULT_PLUGIN_H_
-#define CHROME_COMMON_DEFAULT_PLUGIN_H_
-#pragma once
-
-namespace chrome {
-
-// Register the default plugin as an internal plugin in the PluginList.
-void RegisterInternalDefaultPlugin();
-
-} // namespace chrome
-
-#endif // CHROME_COMMON_DEFAULT_PLUGIN_H_
diff --git a/chrome/plugin/chrome_content_plugin_client.cc b/chrome/plugin/chrome_content_plugin_client.cc
index b26f523..0a8e42b 100644
--- a/chrome/plugin/chrome_content_plugin_client.cc
+++ b/chrome/plugin/chrome_content_plugin_client.cc
@@ -4,8 +4,6 @@
#include "chrome/plugin/chrome_content_plugin_client.h"
-#include "chrome/common/default_plugin.h"
-
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
@@ -29,8 +27,6 @@ void ChromeContentPluginClient::PluginProcessStarted(
cf_plugin_name.get(), app_name.get()));
base::mac::SetProcessName(process_name);
#endif
-
- chrome::RegisterInternalDefaultPlugin();
}
} // namespace chrome