Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
plugin.cpp File Reference
#include "plugin.h"
#include "nsIServiceManager.h"
#include "nsIMemory.h"
#include "nsISupportsUtils.h"

Go to the source code of this file.


NPError NS_PluginInitialize ()
void NS_PluginShutdown ()
nsPluginInstanceBaseNS_NewPluginInstance (nsPluginCreateData *aCreateDataStruct)
void NS_DestroyPluginInstance (nsPluginInstanceBase *aPlugin)


nsIServiceManagergServiceManager = NULL

Function Documentation

Definition at line 121 of file plugin.cpp.

    delete (nsPluginInstance *)aPlugin;

Definition at line 112 of file plugin.cpp.

    return NULL;

  nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
  return plugin;

Definition at line 82 of file plugin.cpp.

  // this is probably a good place to get the service manager
  // note that Mozilla will add reference, so do not forget to release
  nsISupports * sm = NULL;
  NPN_GetValue(NULL, NPNVserviceManager, &sm);

  // Mozilla returns nsIServiceManager so we can use it directly; doing QI on
  // nsISupports here can still be more appropriate in case something is changed 
  // in the future so we don't need to do casting of any sort.
  if(sm) {
    sm->QueryInterface(NS_GET_IID(nsIServiceManager), (void**)&gServiceManager);
  return NPERR_NO_ERROR;

Here is the call graph for this function:

Definition at line 101 of file plugin.cpp.

  // we should release the service manager
  gServiceManager = NULL;

Variable Documentation

Definition at line 45 of file plugin.cpp.