summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 16:50:58 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 16:50:58 +0000
commit2290cb86f535d7babd4d84a2a08831404885e78c (patch)
tree09bca698a3e1a66c14ff50771dee24cd5751c918 /webkit
parente9b3528e6a8d79f465fcdd2e44477f1eb9275539 (diff)
downloadchromium_src-2290cb86f535d7babd4d84a2a08831404885e78c.zip
chromium_src-2290cb86f535d7babd4d84a2a08831404885e78c.tar.gz
chromium_src-2290cb86f535d7babd4d84a2a08831404885e78c.tar.bz2
Make webkit_glue not depend on default_plugin.
This removes a dependency cycle and should also make life easier for DRT. Revert http://codereview.chromium.org/1658012 Review URL: http://codereview.chromium.org/2358001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/default_plugin/default_plugin.gyp8
-rw-r--r--webkit/default_plugin/plugin_main.cc19
-rw-r--r--webkit/glue/plugins/plugin_list.cc20
-rw-r--r--webkit/glue/webkit_glue.gypi5
-rw-r--r--webkit/support/default_plugin_stubs_win.cc29
-rw-r--r--webkit/support/webkit_support.gypi1
-rw-r--r--webkit/tools/test_shell/plugin_tests.cc27
7 files changed, 8 insertions, 101 deletions
diff --git a/webkit/default_plugin/default_plugin.gyp b/webkit/default_plugin/default_plugin.gyp
index 3128e72..5912687 100644
--- a/webkit/default_plugin/default_plugin.gyp
+++ b/webkit/default_plugin/default_plugin.gyp
@@ -16,6 +16,8 @@
'../../third_party/icu/icu.gyp:icuuc',
'../../third_party/libxml/libxml.gyp:libxml',
'../../third_party/npapi/npapi.gyp:npapi',
+ '../support/webkit_support.gyp:webkit_resources',
+ '../support/webkit_support.gyp:webkit_strings',
],
'include_dirs': [
'../..',
@@ -36,12 +38,6 @@
],
'conditions': [
['OS=="win"', {
- 'dependencies': [
- # TODO(thakis): These throw a CircularException on mac.
- # Figure out why once they're needed.
- '../support/webkit_support.gyp:webkit_resources',
- '../support/webkit_support.gyp:webkit_strings',
- ],
'msvs_guid': '5916D37D-8C97-424F-A904-74E52594C2D6',
'link_settings': {
'libraries': ['-lurlmon.lib'],
diff --git a/webkit/default_plugin/plugin_main.cc b/webkit/default_plugin/plugin_main.cc
index f31cbd5..4d0fd5b 100644
--- a/webkit/default_plugin/plugin_main.cc
+++ b/webkit/default_plugin/plugin_main.cc
@@ -167,11 +167,6 @@ NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16 mode, int16 argc,
// 1. Test-shell
// 2. The plugin is running in the renderer process.
if (webkit_glue::IsPluginRunningInRendererProcess()) {
- if (!base::strcasecmp(plugin_type,
- "application/chromium-test-default-plugin")) {
- SignalTestResult(instance);
- return NPERR_NO_ERROR;
- }
return NPERR_GENERIC_ERROR;
}
@@ -189,6 +184,12 @@ NPError NPP_New(NPMIMEType plugin_type, NPP instance, uint16 mode, int16 argc,
argn, argv);
instance->pdata = reinterpret_cast<void*>(plugin_impl);
+
+ if (!base::strcasecmp(plugin_type,
+ "application/chromium-test-default-plugin")) {
+ SignalTestResult(instance);
+ }
+
return NPERR_NO_ERROR;
}
@@ -205,14 +206,6 @@ NPError NPP_Destroy(NPP instance, NPSavedData** save) {
}
NPError NPP_SetWindow(NPP instance, NPWindow* window_info) {
- // The default plugin only loads in in-process mode during execution of
- // PluginTest.DefaultPluginLoadTest. In that case, NPP_New() just calls
- // SignalTestResult() and doesn't set |instance->pdata|.
- // NPP_SetWindow() is called by webkit during layout of the test html. OS X
- // and linux DCHECK the result of this function, so pretend that all's well.
- if (webkit_glue::IsPluginRunningInRendererProcess())
- return NPERR_NO_ERROR;
-
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index d8651d7..487420f 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -12,7 +12,6 @@
#include "base/utf_string_conversions.h"
#include "base/time.h"
#include "net/base/mime_util.h"
-#include "webkit/default_plugin/plugin_main.h"
#include "webkit/glue/plugins/plugin_constants_win.h"
#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
@@ -140,25 +139,6 @@ bool PluginList::CreateWebPluginInfo(const PluginVersionInfo& pvi,
PluginList::PluginList()
: plugins_loaded_(false), plugins_need_refresh_(false) {
PlatformInit();
-
- const PluginVersionInfo default_plugin = {
- FilePath(kDefaultPluginLibraryName),
- L"Default Plug-in",
- L"Provides functionality for installing third-party plug-ins",
- L"1",
- L"*",
- L"",
- L"",
- {
-#if !defined(OS_POSIX) || defined(OS_MACOSX)
- default_plugin::NP_GetEntryPoints,
-#endif
- default_plugin::NP_Initialize,
- default_plugin::NP_Shutdown
- }
- };
-
- internal_plugins_.push_back(default_plugin);
}
void PluginList::LoadPlugins(bool refresh) {
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 8adcbf5..83b2a9b 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -366,11 +366,6 @@
'plugins/plugin_stubs.cc',
],
}],
- ['inside_chromium_build==1 or OS!="win"', {
- 'dependencies': [
- '<(DEPTH)/webkit/default_plugin/default_plugin.gyp:default_plugin',
- ],
- }],
['inside_chromium_build==0', {
'dependencies': [
'<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',
diff --git a/webkit/support/default_plugin_stubs_win.cc b/webkit/support/default_plugin_stubs_win.cc
deleted file mode 100644
index f728d1e..0000000
--- a/webkit/support/default_plugin_stubs_win.cc
+++ /dev/null
@@ -1,29 +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.
-
-// These are stubs for default_plugin which isn't currently built in
-// a webkit only checkout.
-
-#include "base/logging.h"
-#include "third_party/npapi/bindings/npapi.h"
-#include "third_party/npapi/bindings/nphostapi.h"
-
-namespace default_plugin {
-
-NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* funcs) {
- NOTIMPLEMENTED();
- return NPERR_GENERIC_ERROR;
-}
-
-NPError API_CALL NP_Initialize(NPNetscapeFuncs* funcs) {
- NOTIMPLEMENTED();
- return NPERR_GENERIC_ERROR;
-}
-
-NPError API_CALL NP_Shutdown(void) {
- NOTIMPLEMENTED();
- return NPERR_GENERIC_ERROR;
-}
-
-} // default_plugin
diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi
index 9e5a358..50f79bf 100644
--- a/webkit/support/webkit_support.gypi
+++ b/webkit/support/webkit_support.gypi
@@ -21,7 +21,6 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit', # for a header generated by grit
],
'sources': [
- 'default_plugin_stubs_win.cc',
'platform_support.h',
'platform_support_gtk.cc',
'platform_support_mac.mm',
diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc
index 4b652cf..81903ac 100644
--- a/webkit/tools/test_shell/plugin_tests.cc
+++ b/webkit/tools/test_shell/plugin_tests.cc
@@ -125,33 +125,6 @@ TEST_F(PluginTest, Refresh) {
ASSERT_EQ(text, "DONE");
}
-TEST_F(PluginTest, DefaultPluginLoadTest) {
- std::string html = "\
- <div id='result'>Test running....</div>\
- <script>\
- function onSuccess() {\
- var result = document.getElementById('result');\
- result.innerHTML = 'DONE';\
- }\
- </script>\
- <DIV ID=PluginDiv>\
- <object classid=\"clsid:9E8BC6CE-AF35-400c-ABF6-A3F746A1871D\">\
- <embed type=\"application/chromium-test-default-plugin\"\
- mode=\"np_embed\"\
- ></embed>\
- </object>\
- </DIV>\
- ";
-
- test_shell_->webView()->mainFrame()->loadHTMLString(
- html, GURL("about:blank"));
- test_shell_->WaitTestFinished();
-
- std::string text =
- test_shell_->webView()->mainFrame()->contentAsText(10000).utf8();
- ASSERT_EQ(true, StartsWithASCII(text, "DONE", true));
-}
-
// Tests that if a frame is deleted as a result of calling NPP_HandleEvent, we
// don't crash.
TEST_F(PluginTest, DeleteFrameDuringEvent) {