API Freeze for nsIServiceManager r=shaver@mozilla.org, sr=rpotts@netscape.com bug 99147
git-svn-id: svn://10.0.0.236/trunk@105458 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "ns4xPluginInstance.h"
|
||||
#include "ns4xPluginStreamListener.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
#include "nsIMemory.h"
|
||||
#include "nsIPluginStreamListener.h"
|
||||
#include "nsPluginsDir.h"
|
||||
@@ -79,7 +80,7 @@ static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Globals
|
||||
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
|
||||
static nsIServiceManager* gServiceMgr = nsnull;
|
||||
static nsIServiceManagerObsolete* gServiceMgr = nsnull;
|
||||
static nsIMemory* gMalloc = nsnull;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -127,7 +128,7 @@ ns4xPlugin::CheckClassInitialized(void)
|
||||
// nsISupports stuff
|
||||
NS_IMPL_ISUPPORTS2(ns4xPlugin, nsIPlugin, nsIFactory);
|
||||
|
||||
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr)
|
||||
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManagerObsolete* serviceMgr)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
memset((void*) &fCallbacks, 0, sizeof(fCallbacks));
|
||||
@@ -225,7 +226,7 @@ void ns4xPlugin::SetPluginRefNum(short aRefNum)
|
||||
//One ns4xPlugin object exists per Plugin (not instance).
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::CreatePlugin(nsIServiceManager* aServiceMgr,
|
||||
ns4xPlugin::CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
|
||||
const char* aFileName,
|
||||
PRLibrary* aLibrary,
|
||||
nsIPlugin** aResult)
|
||||
@@ -1119,10 +1120,10 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
|
||||
case NPNVserviceManager: {
|
||||
// GetGlobalServiceManager does not AddRef, so we do here.
|
||||
nsIServiceManager* serviceManager;
|
||||
res = nsServiceManager::GetGlobalServiceManager(&serviceManager);
|
||||
nsIServiceManagerObsolete* serviceManager;
|
||||
res = nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&serviceManager);
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
*(nsIServiceManager**)result = serviceManager;
|
||||
*(nsIServiceManagerObsolete**)result = serviceManager;
|
||||
NS_ADDREF(serviceManager);
|
||||
return NPERR_NO_ERROR;
|
||||
} else
|
||||
|
||||
@@ -74,7 +74,7 @@ typedef NS_CALLBACK_(NPError, NP_PLUGINSHUTDOWN) (void);
|
||||
typedef NS_CALLBACK_(NPError, NP_MAIN) (NPNetscapeFuncs* nCallbacks, NPPluginFuncs* pCallbacks, NPP_ShutdownUPP* unloadUpp);
|
||||
#endif
|
||||
|
||||
class nsIServiceManager;
|
||||
class nsIServiceManagerObsolete;
|
||||
class nsIMemory;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -87,7 +87,7 @@ class ns4xPlugin : public nsIPlugin
|
||||
{
|
||||
public:
|
||||
|
||||
ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr);
|
||||
ns4xPlugin(NPPluginFuncs* callbacks, PRLibrary* aLibrary, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManagerObsolete* serviceMgr);
|
||||
virtual ~ns4xPlugin(void);
|
||||
|
||||
static void ReleaseStatics();
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
*/
|
||||
|
||||
static nsresult
|
||||
CreatePlugin(nsIServiceManager* aServiceMgr,
|
||||
CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
|
||||
const char* aFileName,
|
||||
PRLibrary* aLibrary,
|
||||
nsIPlugin** aResult);
|
||||
|
||||
@@ -4206,8 +4206,8 @@ NS_IMETHODIMP nsPluginHostImpl::GetPluginFactory(const char *aMimeType, nsIPlugi
|
||||
{
|
||||
// No, this is not a leak. GetGlobalServiceManager() doesn't
|
||||
// addref the pointer on the way out. It probably should.
|
||||
nsIServiceManager* serviceManager;
|
||||
nsServiceManager::GetGlobalServiceManager(&serviceManager);
|
||||
nsIServiceManagerObsolete* serviceManager;
|
||||
nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&serviceManager);
|
||||
|
||||
// need to get the plugin factory from this plugin.
|
||||
nsFactoryProc nsGetFactory = nsnull;
|
||||
|
||||
@@ -420,8 +420,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
||||
|
||||
// No, this doesn't leak. GetGlobalServiceManager() doesn't addref
|
||||
// it's out pointer. Maybe it should.
|
||||
nsIServiceManager* mgr;
|
||||
nsServiceManager::GetGlobalServiceManager(&mgr);
|
||||
nsIServiceManagerObsolete* mgr;
|
||||
nsServiceManager::GetGlobalServiceManager((nsIServiceManager**)&mgr);
|
||||
|
||||
nsFactoryProc nsGetFactory =
|
||||
(nsFactoryProc) PR_FindSymbol(pLibrary, "NSGetFactory");
|
||||
|
||||
Reference in New Issue
Block a user