diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index c1662cbb4f7..b4d0c7fcd2a 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -43,7 +43,8 @@ #include "prprf.h" #include "nsIPluginHost.h" #include "nsplugin.h" -#include "nsPluginsCID.h" +//#include "nsPluginsCID.h" +#include "nsIPluginManager.h" #include "nsIPref.h" #include "nsIRefreshUrl.h" #include "nsITimer.h" @@ -372,7 +373,8 @@ static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID); static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID); -static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); +//static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); +static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID); static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID); static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID); static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID); @@ -396,7 +398,7 @@ nsresult nsWebShell::CreatePluginHost(PRBool aAllowPlugins) { if (nsnull == mPluginManager) { - rv = nsRepository::CreateInstance(kCPluginHostCID, nsnull, + rv = nsRepository::CreateInstance(kCPluginManagerCID, nsnull, kIPluginManagerIID, (void**)&mPluginManager); if (NS_OK == rv) diff --git a/modules/oji/src/nsJVMManager.cpp b/modules/oji/src/nsJVMManager.cpp index 969334c963a..e1b6e230c34 100644 --- a/modules/oji/src/nsJVMManager.cpp +++ b/modules/oji/src/nsJVMManager.cpp @@ -54,7 +54,9 @@ extern "C" int XP_JAVA_STARTUP_FAILED; extern "C" int XP_JAVA_DEBUGGER_FAILED; extern nsIServiceManager *g_pNSIServiceManager; static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID); -static NS_DEFINE_CID(kPluginHostIID, NS_IPLUGINHOST_IID); +//static NS_DEFINE_CID(kPluginHostIID, NS_IPLUGINHOST_IID); +static NS_DEFINE_IID(kPluginHostIID, NS_IPLUGINHOST_IID); +static NS_DEFINE_IID(kPluginManagerIID, NS_IPLUGINMANAGER_IID); // FIXME -- need prototypes for these functions!!! XXX #ifdef XP_MAC @@ -432,9 +434,12 @@ nsJVMManager::StartupJVM(void) ** do JNI calls via liveconnect. ** nsIPlugin* plugin = NPL_LoadPluginByType(NS_JVM_MIME_TYPE); */ - nsIPluginHost* pNSIPluginHost = NULL; - nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginHostIID, (nsISupports**)&pNSIPluginHost); - if (err != NS_OK) { + + /*nsIPluginHost* pNSIPluginHost = NULL; + nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginHostIID, (nsISupports**)&pNSIPluginHost);*/ + + nsresult err = g_pNSIServiceManager->GetService(kPluginManagerCID, kPluginManagerIID, (nsISupports**)&plugin); + if (err != NS_OK) { fStatus = nsJVMStatus_Failed; return fStatus; } diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index c1662cbb4f7..b4d0c7fcd2a 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -43,7 +43,8 @@ #include "prprf.h" #include "nsIPluginHost.h" #include "nsplugin.h" -#include "nsPluginsCID.h" +//#include "nsPluginsCID.h" +#include "nsIPluginManager.h" #include "nsIPref.h" #include "nsIRefreshUrl.h" #include "nsITimer.h" @@ -372,7 +373,8 @@ static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID); static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID); -static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); +//static NS_DEFINE_IID(kCPluginHostCID, NS_PLUGIN_HOST_CID); +static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID); static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID); static NS_DEFINE_IID(kRefreshURLIID, NS_IREFRESHURL_IID); static NS_DEFINE_IID(kITimerCallbackIID, NS_ITIMERCALLBACK_IID); @@ -396,7 +398,7 @@ nsresult nsWebShell::CreatePluginHost(PRBool aAllowPlugins) { if (nsnull == mPluginManager) { - rv = nsRepository::CreateInstance(kCPluginHostCID, nsnull, + rv = nsRepository::CreateInstance(kCPluginManagerCID, nsnull, kIPluginManagerIID, (void**)&mPluginManager); if (NS_OK == rv)